From 4ab95bd255d2c56c04fb52d6e5a0dcec34840238 Mon Sep 17 00:00:00 2001 From: bangbang93 Date: Thu, 5 Jul 2018 11:28:59 +0800 Subject: [PATCH 0001/1121] fix mockjs.Random.string() mockjs.Random.string() can be called without arguments. --- types/mockjs/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mockjs/index.d.ts b/types/mockjs/index.d.ts index a0ca673b0a..9be645b791 100644 --- a/types/mockjs/index.d.ts +++ b/types/mockjs/index.d.ts @@ -58,7 +58,7 @@ declare namespace mockjs { character(pool?: S): S; // Random.string - string(pool: S | N, min?: N, max?: N): S; + string(pool?: S | N, min?: N, max?: N): S; // Random.range range(start?: N, stop?: N, step?: N): N; From abdca373e90201f817c2b20643e01d03a1eb0697 Mon Sep 17 00:00:00 2001 From: ptrdu Date: Wed, 26 Sep 2018 17:12:52 +0800 Subject: [PATCH 0002/1121] FEAT: add bucket operations --- types/ali-oss/ali-oss-tests.ts | 3 + types/ali-oss/index.d.ts | 247 +++++++++++++++++++++++++++++++++ types/ali-oss/tsconfig.json | 23 +++ types/ali-oss/tslint.json | 79 +++++++++++ 4 files changed, 352 insertions(+) create mode 100644 types/ali-oss/ali-oss-tests.ts create mode 100644 types/ali-oss/index.d.ts create mode 100644 types/ali-oss/tsconfig.json create mode 100644 types/ali-oss/tslint.json diff --git a/types/ali-oss/ali-oss-tests.ts b/types/ali-oss/ali-oss-tests.ts new file mode 100644 index 0000000000..3cf3229da9 --- /dev/null +++ b/types/ali-oss/ali-oss-tests.ts @@ -0,0 +1,3 @@ +import OSS from "ali-oss"; + +const client = new OSS(); diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts new file mode 100644 index 0000000000..b7c0f35067 --- /dev/null +++ b/types/ali-oss/index.d.ts @@ -0,0 +1,247 @@ +// Type definitions for ali-oss 6.0.1 +// Project: https://github.com/ali-sdk/ali-oss +// Definitions by: Ptrdu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.2.0 + +export type Bucket = { + +} + +export type StorageType = "Standard" | "IA" | "Archive" + +export type ACLType = "public-read-write" | "public-read" | "and private" + +export type RequestOptions = { + // the operation timeout + timeout?: number +} + +export type RuleStatusType = "Enabled" | "Disabled" + +export type LifecycleRule = { + id?: string, // rule id, if not set, OSS will auto create it with random string. + prefix: string, // store prefix + status: RuleStatusType, // rule status, allow values: Enabled or Disabled + days?: number | string, // expire after the days + date: string // expire date, e.g.: 2022-10-11T00:00:00.000Z date and days only set one. +} + +export type CORSRule = { + allowedOrigin: string | Array, // configure for Access-Control-Allow-Origin header + allowedMethod: string | Array, // configure for Access-Control-Allow-Methods header + allowedHeader?: string | Array, // configure for Access-Control-Allow-Headers header + exposeHeader?: string | Array, // configure for Access-Control-Expose-Headers header + maxAgeSeconds?: string | Array, // configure for Access-Control-Max-Age header +} + +export interface NormalSuccessResponse { + //response status + status: number, + // response headers + headers: object, // todo the object in detail + // response size + size: number, + // request total use time (ms) + rt: number +} + +export default class OSS { + /******************************************* the bucket operations *************************************************/ + // base operators + /** + * List buckets in this account. + * @param {{prefix?: string; marker?: string; "max-keys"?: string | number} | null} query - query parameters, default is null + * prefix - search buckets using prefix key + * marker - search start from marker, including marker key + * max-keys - max buckets, default is 100, limit to 1000 + * @param {{timeout?: number}} options - optional parameters + * timeout - the operation timeout + * @return {Promise>} + */ + listBuckets(query: { prefix?: string, marker?: string, 'max-keys'?: string | number } | null, options?: { timeout?: number }): Promise> + + /** + * Create a new bucket. + * @param {string} name - bucket name If bucket exists and not belong to current account, will throw BucketAlreadyExistsError. If bucket not exists, will create a new bucket and set it's ACL. + * @param {{timeout: number; storageClass: StorageType}} options - optional parameters + * timeout - the operation timeout + * StorageClass - the storage type include (Standard,IA,Archive) + * @return { Promise<{ bucket: string, res: NormalSuccessResponse }> } + */ + putBucket(name: string, options?: { timeout: number, storageClass: StorageType }): Promise<{ bucket: string, res: NormalSuccessResponse }> + + /** + * Use the bucket. + * @param {string} name - bucket name + */ + useBucket(name: string) : void + + /** + * Delete an empty bucket. + * @param {string} name - bucket name If bucket is not empty, will throw BucketNotEmptyError. If bucket is not exists, will throw NoSuchBucketError. + * @param {RequestOptions} options + * @return {Promise} + */ + deleteBucket(name: string, options?: RequestOptions): Promise + + /** + * Get bucket information,include CreationDate、ExtranetEndpoint、IntranetEndpoint、Location、Name、StorageClass、 Owner、AccessControlList + * @param {string} name - bucket name + * @return {Promise} // todo the official document miss the return type + */ + getBucketInfo(name: string): Promise + + /** + * Get bucket location + * @param {string} name - bucket name + * @return {Promise} // todo the official document miss the return type + */ + getBucketLocation(name: string): Promise + // ACL operations + /** + * Update the bucket ACL. + * @param {string} name - bucket name + * @param {ACLType} acl - access control list, current available: public-read-write, public-read and private + * @param {RequestOptions} options + * @return {Promise} + */ + putBucketACL(name: string, acl: ACLType, options?: RequestOptions): Promise + + /** + * Get the bucket ACL. + * @param {string} name - bucket name + * @param {RequestOptions} options + * @return {Promise<{ acl: string, res: NormalSuccessResponse }>} + * acl - acl settings string + */ + getBucketACL(name: string, options?: RequestOptions ): Promise<{ acl: string, res: NormalSuccessResponse }> + // logging operations + /** + * Update the bucket logging settings. Log file will create every one hour and name format: -YYYY-mm-DD-HH-MM-SS-UniqueString. + * @param {string} name - bucket name + * @param {string} prefix - prefix path name to store the log files + * @param {RequestOptions} options + * @return {Promise} + */ + putBucketLogging(name: string, prefix?: string, options?: RequestOptions): Promise + + /** + * Get the bucket logging settings. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise<{ enable: boolean, prefix: string | null, res: NormalSuccessResponse }>} + */ + getBucketLogging(name: string, options?: RequestOptions): Promise<{ enable: boolean, prefix: string | null, res: NormalSuccessResponse }> + + /** + * Delete the bucket logging settings. + * @param {string} name - bucket name + * @param {RequestOptions} options + * @return {Promise} + */ + deleteBucketLogging(name: string, options?: RequestOptions) : Promise + // Website operations + /** + * Set the bucket as a static website. + * @param {string} name - bucket name + * @param {{index: string; error?: string}} config + * index - default page, e.g.: index.html + * error - error page, e.g.: 'error.html' + * @return {Promise} + */ + putBucketWebsite(name: string, config: { index: string, error?: string }): Promise + + /** + * Get the bucket website config. + * @param {string} name - bucket name + * @param {RequestOptions} options + * @return {Promise<{ index: string, error: string, res: NormalSuccessResponse }>} + */ + getBucketWebsite(name: string, options?: RequestOptions): Promise<{ index: string, error: string, res: NormalSuccessResponse }> + + /** + * Delete the bucket website config. + * @param {string} name - bucket name + * @param {RequestOptions} options + * @return {Promise} + */ + deleteBucketWebsite(name: string, options?: RequestOptions): Promise + // referer operations + /** + * Set the bucket request Referer white list. + * @param {string} name + * @param {boolean} allowEmpty - allow empty request referer or not + * @param {Array} referers - Referer white list, e.g.: ['https://npm.taobao.org', 'http://cnpmjs.org'] + * @param {RequestOptions} options + * @return {Promise} + */ + putBucketReferer(name: string, allowEmpty: boolean, referers: Array, options?: RequestOptions): Promise + + /** + * Get the bucket request Referer white list. + * @param {string} name - bucket name + * @param {RequestOptions} options + * @return {Promise<{ allowEmpty: boolean, referers: Array, res: NormalSuccessResponse }>} + */ + getBucketReferer(name: string, options?: RequestOptions): Promise<{ allowEmpty: boolean, referers: Array, res: NormalSuccessResponse }> + + /** + * Delete the bucket request Referer white list. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise} + */ + deleteBucketReferer(name: string, options?: RequestOptions): Promise + // lifecycle operations + /** + * Set the bucket object lifecycle. + * @param {string} name + * @param {Array} rules - rule config list + * @param {RequestOptions} options + * @return {Promise} + */ + putBucketLifecycle(name: string, rules: Array, options?: RequestOptions): Promise + + /** + * Get the bucket object lifecycle. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise<{ rules: Array, res: NormalSuccessResponse }>} + */ + getBucketLifecycle(name: string, options?: RequestOptions): Promise<{ rules: Array, res: NormalSuccessResponse }> + + /** + * Delete the bucket object lifecycle. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise} + */ + deleteBucketLifecycle(name: string, options?: RequestOptions): Promise + // CORS operations + /** + * Set CORS rules of the bucket object + * @param {string} name + * @param {Array} rules + * @param {RequestOptions} options + * @return {Promise} + */ + putBucketCORS(name: string, rules: Array, options?: RequestOptions): Promise + + /** + * Get CORS rules of the bucket object. + * @param {string} name + * @return {Promise<{rules: Array; res: NormalSuccessResponse}>} + */ + getBucketCORS(name: string): Promise<{ rules: Array, res: NormalSuccessResponse}> + + /** + * Delete CORS rules of the bucket object. + * @param {string} name + * @return {Promise} + */ + deleteBucketCORS(name: string): Promise + + /********************************************************** Object operations ********************************************/ + +} diff --git a/types/ali-oss/tsconfig.json b/types/ali-oss/tsconfig.json new file mode 100644 index 0000000000..a3e68ada2b --- /dev/null +++ b/types/ali-oss/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ali-oss-tests.ts" + ] +} diff --git a/types/ali-oss/tslint.json b/types/ali-oss/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/ali-oss/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} From 3e6f81d1563df1c7a81548935eec22606469a106 Mon Sep 17 00:00:00 2001 From: ptrdu Date: Thu, 27 Sep 2018 11:14:53 +0800 Subject: [PATCH 0003/1121] FEAT: add function definition, current at object uploadPartCopy --- types/ali-oss/index.d.ts | 417 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 398 insertions(+), 19 deletions(-) diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index b7c0f35067..85708838d3 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -4,6 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.2.0 +// general type + export type Bucket = { } @@ -12,6 +14,8 @@ export type StorageType = "Standard" | "IA" | "Archive" export type ACLType = "public-read-write" | "public-read" | "and private" +export type HTTPMethods = "GET" | "POST" | "DELETE" | "PUT"; + export type RequestOptions = { // the operation timeout timeout?: number @@ -35,7 +39,22 @@ export type CORSRule = { maxAgeSeconds?: string | Array, // configure for Access-Control-Max-Age header } -export interface NormalSuccessResponse { +export type OwnerType = { + id: string, + displayName: string +} + +export type ObjectMeta = { + name: string, // object name on oss + lastModified: string, // object last modified GMT date, e.g.: 2015-02-19T08:39:44.000Z + etag: string, // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" + type: string, // object type, e.g.: Normal + size: number, // object size, e.g.: 344606 + storageClass: StorageType, + owner: OwnerType, +} + +export type NormalSuccessResponse = { //response status status: number, // response headers @@ -46,36 +65,215 @@ export interface NormalSuccessResponse { rt: number } +export type UserMeta = { + uid: number, + pid: number +} + +export type ObjectCallback = { + url: string, // After a file is uploaded successfully, the OSS sends a callback request to this URL. + host?: string, // The host header value for initiating callback requests. + body: string, // The value of the request body when a callback is initiated, for example, key=$(key)&etag=$(etag)&my_var=$(x:my_var). + contentType?: string, // The Content-Type of the callback requests initiatiated, It supports application/x-www-form-urlencoded and application/json, and the former is the default value. + customValue?: object, + headers?: object // extra headers, detail see RFC 2616 +} + +export type ModifyData = { + lastModified: string, // object last modified GMT string + etag: string // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" +} + +// parameters type +export type ListBucketsQueryType = { + prefix?: string, // search buckets using prefix key + marker?: string, // search start from marker, including marker key + 'max-keys'?: string | number // max buckets, default is 100, limit to 1000 +} + +export type PutBucketOptions = { + timeout: number, + storageClass: StorageType +} + +export type PutBucketWebsiteConfig = { + index: string, // default page, e.g.: index.html + error?: string // error page, e.g.: 'error.html' +} + +export type ListObjectsQuery = { + prefix?: string, // search object using prefix key + marker?: string, // search start from marker, including marker key + delimiter?: string, // delimiter search scope e.g. / only search current dir, not including subdir + 'max-keys': string | number // max objects, default is 100, limit to 1000 +} + +export type ListObjectResult = { + objects: Array, + prefixes: Array, + isTruncated: boolean, + nextMarker: string, + res: NormalSuccessResponse +} + +export type PutObjectOptions = { + timeout?: number, // the operation timeout + mime?: string, // custom mime, will send with Content-Type entity header + meta?: UserMeta, // user meta, will send with x-oss-meta- prefix string e.g.: { uid: 123, pid: 110 } + callback: ObjectCallback, +} + +export type PutObjectResult = { + name: string, + data: object, + res: NormalSuccessResponse +} + +export type PutStreamOptions = { + contentLength?: number, // the stream length, chunked encoding will be used if absent + timeout: number, // the operation timeout + mime: string, // custom mime, will send with Content-Type entity header + meta: UserMeta, + callback: ObjectCallback +} + +export type AppendObjectOptions = { + position?: string, // specify the position which is the content length of the latest object + timeout?: number, // the operation timeout + mime?: string, // custom mime, will send with Content-Type entity header + meta?: UserMeta, + headers?: object +} + +export type AppendObjectResult = { + name: string, + url: string, // the url of oss + res: NormalSuccessResponse, + nextAppendPosition: string, // the next position +} + +export type HeadObjectOptions = { + timeout?: number, + headers?: object +} + +export type HeadObjectResult = { + status: number, // response status, maybe 200 or 304 + meta: UserMeta, + res: NormalSuccessResponse +} + +export type GetObjectOptions = { + timeout?: number, + process?: string, // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} + headers?: object +} + +export type GetObjectResult = { + content?: any, // file content buffer if file parameter is null or ignore + res: NormalSuccessResponse +} + +export type GetStreamOptions = { + timeout?: number, + process?: string, // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} + headers?: object +} + +export type GetStreamResult = { + stream?: any, // readable stream instance if response status is not 200, stream will be null. + res: NormalSuccessResponse +} + +export type CopyObjectOptions = { + timeout?: number, + meta?: UserMeta, + headers?: object +} + +export type CopyAndPutMetaResult = { + data: ModifyData, + res: NormalSuccessResponse +} + +export type DeleteMultiOptions = { + quite?: boolean // quiet mode or verbose mode, default is false, verbose mode quiet mode: if all objects delete succes, return emtpy response. otherwise return delete error object results. verbose mode: return all object delete results. + timeout?: number +} + +export type DeleteMultiResult = { + deleted?: Array // deleted object names list + res: NormalSuccessResponse +} + +export type ResponseHeaderType = { + 'content-type'?: string, + 'content-disposition'? :string, + 'cache-control'?: string +} + +export type SignatureUrlOptions = { + expires?: number, // after expires seconds, the url will become invalid, default is 1800 + method?: HTTPMethods, // the HTTP method, default is 'GET' + 'Content-Type'?: string, // set the request content type + process?: string, + response?: ResponseHeaderType, // set the response headers for download + callback?: ObjectCallback +} + +export type GetACLResult = { + acl: ACLType, + res: NormalSuccessResponse +} + +export type InitMultipartUploadOptions = { + timeout?: number, + mime?: string, // Mime file type + meta?: UserMeta, + headers?: object +} + +export type InitMultipartUploadResult = { + res: { status: number, headers: object, size: number, rt: number } + bucket: string, // bucket name + name: string, // object name store on OSS + uploadId: string, // upload id, use for uploadPart, completeMultipart +} + +export type UploadPartResult = { + name: string, + etag: string, + res: NormalSuccessResponse +} + export default class OSS { + // the image client + static ImageClient: any /******************************************* the bucket operations *************************************************/ + // base operators /** * List buckets in this account. - * @param {{prefix?: string; marker?: string; "max-keys"?: string | number} | null} query - query parameters, default is null - * prefix - search buckets using prefix key - * marker - search start from marker, including marker key - * max-keys - max buckets, default is 100, limit to 1000 - * @param {{timeout?: number}} options - optional parameters + * @param {ListBucketsQueryType | null} query - query parameters, default is null + * @param {RequestOptions} options - optional parameters * timeout - the operation timeout * @return {Promise>} */ - listBuckets(query: { prefix?: string, marker?: string, 'max-keys'?: string | number } | null, options?: { timeout?: number }): Promise> + listBuckets(query: ListBucketsQueryType | null, options?: RequestOptions): Promise> /** * Create a new bucket. * @param {string} name - bucket name If bucket exists and not belong to current account, will throw BucketAlreadyExistsError. If bucket not exists, will create a new bucket and set it's ACL. - * @param {{timeout: number; storageClass: StorageType}} options - optional parameters - * timeout - the operation timeout - * StorageClass - the storage type include (Standard,IA,Archive) + * @param {PutBucketOptions} options - optional parameters * @return { Promise<{ bucket: string, res: NormalSuccessResponse }> } */ - putBucket(name: string, options?: { timeout: number, storageClass: StorageType }): Promise<{ bucket: string, res: NormalSuccessResponse }> + putBucket(name: string, options?: PutBucketOptions): Promise<{ bucket: string, res: NormalSuccessResponse }> /** * Use the bucket. * @param {string} name - bucket name */ - useBucket(name: string) : void + useBucket(name: string): void /** * Delete an empty bucket. @@ -98,6 +296,7 @@ export default class OSS { * @return {Promise} // todo the official document miss the return type */ getBucketLocation(name: string): Promise + // ACL operations /** * Update the bucket ACL. @@ -115,7 +314,8 @@ export default class OSS { * @return {Promise<{ acl: string, res: NormalSuccessResponse }>} * acl - acl settings string */ - getBucketACL(name: string, options?: RequestOptions ): Promise<{ acl: string, res: NormalSuccessResponse }> + getBucketACL(name: string, options?: RequestOptions): Promise<{ acl: string, res: NormalSuccessResponse }> + // logging operations /** * Update the bucket logging settings. Log file will create every one hour and name format: -YYYY-mm-DD-HH-MM-SS-UniqueString. @@ -140,17 +340,16 @@ export default class OSS { * @param {RequestOptions} options * @return {Promise} */ - deleteBucketLogging(name: string, options?: RequestOptions) : Promise + deleteBucketLogging(name: string, options?: RequestOptions): Promise + // Website operations /** * Set the bucket as a static website. * @param {string} name - bucket name - * @param {{index: string; error?: string}} config - * index - default page, e.g.: index.html - * error - error page, e.g.: 'error.html' + * @param {PutBucketWebsiteConfig} config * @return {Promise} */ - putBucketWebsite(name: string, config: { index: string, error?: string }): Promise + putBucketWebsite(name: string, config: PutBucketWebsiteConfig): Promise /** * Get the bucket website config. @@ -167,6 +366,7 @@ export default class OSS { * @return {Promise} */ deleteBucketWebsite(name: string, options?: RequestOptions): Promise + // referer operations /** * Set the bucket request Referer white list. @@ -193,6 +393,7 @@ export default class OSS { * @return {Promise} */ deleteBucketReferer(name: string, options?: RequestOptions): Promise + // lifecycle operations /** * Set the bucket object lifecycle. @@ -218,6 +419,7 @@ export default class OSS { * @return {Promise} */ deleteBucketLifecycle(name: string, options?: RequestOptions): Promise + // CORS operations /** * Set CORS rules of the bucket object @@ -233,7 +435,7 @@ export default class OSS { * @param {string} name * @return {Promise<{rules: Array; res: NormalSuccessResponse}>} */ - getBucketCORS(name: string): Promise<{ rules: Array, res: NormalSuccessResponse}> + getBucketCORS(name: string): Promise<{ rules: Array, res: NormalSuccessResponse }> /** * Delete CORS rules of the bucket object. @@ -243,5 +445,182 @@ export default class OSS { deleteBucketCORS(name: string): Promise /********************************************************** Object operations ********************************************/ + /** + * List objects in the bucket. + * @param {ListObjectsQuery | null} query + * @param {RequestOptions} options + * @return {Promise} + */ + list(query: ListObjectsQuery | null, options: RequestOptions): Promise + + /** + * Add an object to the bucket. + * @param {string} name - object name store on OSS + * @param file - {String|Buffer|ReadStream|File(only support Browser)|Blob(only support Browser)} object local path, content buffer or ReadStream content instance use in Node, Blob and html5 File + * @param {PutObjectOptions} options - optional parameters + * @return {Promise} + */ + put(name: string, file: any, options?: PutObjectOptions): Promise + + /** + * Add a stream object to the bucket. + * @param {string} name - object name store on OSS + * @param stream - object ReadStream content instance + * @param {PutStreamOptions} options - optional parameters + * @return {Promise<{name: string; res: NormalSuccessResponse}>} + */ + putStream(name: string, stream: any, options?: PutStreamOptions): Promise<{ name: string, res: NormalSuccessResponse }> + + /** + * Append an object to the bucket, it's almost same as put, but it can add content to existing object rather than override it. + * @param {string} name + * @param file + * @param {AppendObjectOptions} options + * @return {Promise} + */ + append(name: string, file: any, options?: AppendObjectOptions): Promise + + /** + * Get the Object url. If provide baseUrl, will use baseUrl instead the default endpoint. + * @param {string} name + * @param {string} baseUrl + * @return {string} + */ + getObjectUrl(name: string, baseUrl?: string): string + + /** + * Get the Object url. If provide baseUrl, will use baseUrl instead the default bucket and endpoint. Suggest use generateObjectUrl instead of getObjectUrl. + * @param {string} name + * @param {string} baseUrl + * @return {string} + */ + generateObjectUrl(name: string, baseUrl?: string): string + + /** + * Head an object and get the meta info. + * @param {string} name + * @param {HeadObjectOptions} options + * @return {Promise} + */ + head(name: string, options?: HeadObjectOptions): Promise + + /** + * Get an object from the bucket. + * @param {string} name + * @param file - {String|WriteStream} file path or WriteStream instance to store the content If file is null or ignore this parameter, function will return info contains content property. + * @param {GetObjectOptions} options + * @return {Promise} + */ + get(name: string, file?: any, options?: GetObjectOptions): Promise + + /** + * Get an object read stream. + * @param {string} name + * @param {GetStreamOptions} options + * @return {Promise} + */ + getStream(name?: string, options?: GetStreamOptions): Promise + + /** + * Delete an object from the bucket. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise} + */ + delete(name: string, options?: RequestOptions): Promise + + /** + * Copy an object from sourceName to name. + * @param {string} name - object name store on OSS + * @param {string} sourceName - source object name If sourceName start with /, meaning it's a full name contains the bucket name. e.g.: /otherbucket/logo.png meaning copy otherbucket logn.png object to current bucket. + * @param {CopyObjectOptions} options + * @return {Promise} + */ + copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise + + /** + * Set an exists object meta. + * @param {string} name + * @param {UserMeta} meta + * @param {RequestOptions} options + * @return {Promise} + */ + putMeta(name: string, meta: UserMeta, options: RequestOptions): Promise + + /** + * Delete multi objects in one request. + * @param {Array} names - object names, max 1000 objects in once. + * @param {DeleteMultiOptions} options + * @return {Promise} + */ + deleteMulti(names: Array, options?: DeleteMultiOptions): Promise + + /** + * Create a signature url for download or upload object. When you put object with signatureUrl ,you need to pass Content-Type.Please look at the example. + * @param {string} name + * @param {SignatureUrlOptions} options + * @return {string} + */ + signatureUrl(name: string, options?: SignatureUrlOptions): string + + /** + * Set object's ACL. + * @param {string} name + * @param {ACLType} acl + * @param {RequestOptions} options + * @return {Promise} + */ + putACL(name: string, acl: ACLType, options?: RequestOptions): Promise + + /** + * Get object's ACL. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise} + */ + getACL(name:string, options?: RequestOptions): Promise + + /** + * Restore Object. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise} + */ + restore(name: string, options?: RequestOptions): Promise + + /** + * + * @param {string} name + * @param {InitMultipartUploadOptions} options + * @return {Promise} + */ + initMultipartUpload(name: string, options?: InitMultipartUploadOptions): Promise + + /** + * After initiating a Multipart Upload event, you can upload data in parts based on the specified object name and Upload ID. + * @param {string} name - object name + * @param {string} uploadId - get by initMultipartUpload api + * @param {number} partNo - range is 1-10000, If this range is exceeded, OSS returns the InvalidArgument's error code. + * @param file - is File or FileName, the whole file + Multipart Upload requires that the size of any Part other than the last Part is greater than 100KB. + In Node you can use File or FileName, but in browser you only can use File. + * @param {number} start - part start bytes e.g: 102400 + * @param {number} end - part end bytes e.g: 204800 + * @param {RequestOptions} options + * @return {Promise} + */ + uploadPart(name: string, uploadId: string, partNo: number, file: any, start: number, end: number, options?: RequestOptions): Promise + + /** + * Using Upload Part Copy, you can copy data from an existing object and upload a part of the data. When copying a file larger than 1 GB, you must use the Upload Part Copy method. If you want to copy a file smaller than 1 GB, see Copy Object. + * @param {string} name + * @param {string} uploadId + * @param {number} partNo + * @param {string} range + * @param {{sourceKey: string; sourceBucketName: string}} sourceData + * @param {{timeout?: number; headers?: object}} options + * @return {Promise} + */ + uploadPartCopy(name: string, uploadId: string, partNo: number, range: string, sourceData: { sourceKey: string, sourceBucketName: string }, options: { timeout?: number, headers?: object }): Promise } From 5992ddd064ff74c68e9c32c13fc823ca31a51744 Mon Sep 17 00:00:00 2001 From: ptrdu Date: Thu, 27 Sep 2018 15:09:50 +0800 Subject: [PATCH 0004/1121] FEAT: add object operations definitions --- types/ali-oss/index.d.ts | 165 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index 85708838d3..fc0ff41ae1 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -84,6 +84,28 @@ export type ModifyData = { etag: string // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" } +export type Checkpoint = { + file: any, // The file object selected by the user, if the browser is restarted, it needs the user to manually trigger the settings + name: string, // object key + fileSize: number, + partSize: number, + uploadId: string, + doneParts: Array<{ number: number, etag: string }> +} + +export type ObjectPart = { + PartNumber: number, + LastModified: any, // {Date} Time when a part is uploaded. + ETag: string, + size: number +} + +export type Upload = { + name: string, + uploadId: string, + initiated: any +} + // parameters type export type ListBucketsQueryType = { prefix?: string, // search buckets using prefix key @@ -246,6 +268,89 @@ export type UploadPartResult = { res: NormalSuccessResponse } +export type CompleteMultipartUploadOptions = { + timeout?: number, + callback?: ObjectCallback, + headers?: object +} + +export type CompleteMultipartUploadResult = { + bucket: string, + name: string, + etag: string, + data: object, + res: NormalSuccessResponse +} + +export type MultipartUploadOptions = { + parallel?: number, // the number of parts to be uploaded in parallel + partSize?: number, // the suggested size for each part + progress?: Function, // the progress callback called after each successful upload of one part, it will be given three parameters: (percentage {Number}, checkpoint {Object}, res {Object}) + checkpoint?: Checkpoint, // the checkpoint to resume upload, if this is provided, it will continue the upload from where interrupted, otherwise a new multipart upload will be created. + meta?: UserMeta, + mime?: string, + callback?: ObjectCallback, + headers?: object, + timeout?: number + copyheaders?: object, // {Object} only uploadPartCopy api used, detail +} + +export type MultipartUploadResult = { + bucket: string, + name: string, + etag: string, + data: object, + res: NormalSuccessResponse +} + +export type MultipartUploadCopyResult = { + bucket: string, + name: string, + etag: string, + res: NormalSuccessResponse +} + +export type MultipartUploadCopySourceData = { + sourceKey: string, // the source object name + sourceBucketName: string, // sourceData. the source bucket name + startOffset: number, // data copy start byte offset, e.g: 0 + endOffset: number // data copy end byte offset, e.g: 102400 +} + +export type ListPartsQuery = { + 'max-parts': number, // The maximum part number in the response of the OSS. default value: 1000. + 'part-number-marker': number, // Starting position of a specific list. A part is listed only when the part number is greater than the value of this parameter. + 'encoding-type': string // Specify the encoding of the returned content and the encoding type. Optional value: url +} + +export type ListPartsResult = { + uploadId: string, + bucket: string, + name: string, + PartNumberMarker: number, + nextPartNumberMarker: number, + maxParts: number, + isTruncated: boolean, + parts: Array, + res: NormalSuccessResponse +} + +export type ListUploadsQuery = { + prefix?: string, + 'max-uploads'?: number, + 'key-marker'?: string, + 'upload-id-marker'?: string +} + +export type ListUploadsResult = { + res: NormalSuccessResponse, + bucket: string, + nextKeyMarker: any, + nextUploadIdMarker: any, + isTruncated: boolean, + uploads: Array +} + export default class OSS { // the image client static ImageClient: any @@ -623,4 +728,64 @@ export default class OSS { */ uploadPartCopy(name: string, uploadId: string, partNo: number, range: string, sourceData: { sourceKey: string, sourceBucketName: string }, options: { timeout?: number, headers?: object }): Promise + /** + * After uploading all data parts, you must call the Complete Multipart Upload API to complete Multipart Upload for the entire file. + * @param {string} name + * @param {string} uploadId + * @param {Array<{number: number; etag: string}>} parts + * @param {CompleteMultipartUploadOptions} options + * @return {Promise} + */ + completeMultipartUpload(name: string, uploadId: string, parts: Array<{ number: number, etag: string }>, options?:CompleteMultipartUploadOptions): Promise + + /** + * Upload file with OSS multipart. + * this function contains initMultipartUpload, uploadPart, completeMultipartUpload. When you use multipartUpload api,if you encounter problems with ConnectionTimeoutError, you should handle ConnectionTimeoutError in your business code. + * How to resolve ConnectionTimeoutError, you can decrease partSize size 、 Increase timeout 、Retry request , or give tips in your business code; + * @param {string} name + * @param file + * @param {MultipartUploadOptions} options + * @return {Promise} + */ + multipartUpload(name: string, file: any, options: MultipartUploadOptions): Promise + + /** + * Copy file with OSS multipart. + * this function contains head, initMultipartUpload, uploadPartCopy, completeMultipartUpload. + * When copying a file larger than 1 GB, you should use the Upload Part Copy method. If you want to copy a file smaller than 1 GB, see Copy Object. + * @param {string} name + * @param {MultipartUploadCopySourceData} sourceData + * @param {MultipartUploadOptions} options + * @return {Promise} + */ + multipartUploadCopy(name: string, sourceData: MultipartUploadCopySourceData, options?: MultipartUploadOptions): Promise + + /** + * The ListParts command can be used to list all successfully uploaded parts mapped to a specific upload ID, i.e.: those not completed and not aborted. + * @param {string} name + * @param {string} uploadId + * @param {ListPartsQuery} query + * @param {RequestOptions} options + * @return {Promise} + */ + listParts(name: string, uploadId: string, query?: ListPartsQuery, options?: RequestOptions): Promise + + /** + * List on-going multipart uploads, i.e.: those not completed and not aborted. + * @param {ListUploadsQuery} query + * @param {RequestOptions} options + * @return {Promise} + */ + listUploads(query: ListUploadsQuery, options?: RequestOptions): Promise + + /** + * Abort a multipart upload for object. + * @param {string} name + * @param {string} uploadId + * @param {RequestOptions} options + * @return {Promise} + */ + abortMultipartUpload(name: string, uploadId: string, options?: RequestOptions): Promise + + /************************************************ RTMP Operations *************************************************************/ } From eea11d19fe8fb925d07ef1fd4ed19308a2b43ffc Mon Sep 17 00:00:00 2001 From: ptrdu Date: Thu, 27 Sep 2018 16:30:04 +0800 Subject: [PATCH 0005/1121] FEATURE: add rtmp operations definition --- types/ali-oss/ali-oss-tests.ts | 8 +- types/ali-oss/index.d.ts | 257 ++++++++++++++++++++++++++------- 2 files changed, 213 insertions(+), 52 deletions(-) diff --git a/types/ali-oss/ali-oss-tests.ts b/types/ali-oss/ali-oss-tests.ts index 3cf3229da9..82941c1e5e 100644 --- a/types/ali-oss/ali-oss-tests.ts +++ b/types/ali-oss/ali-oss-tests.ts @@ -1,3 +1,9 @@ import OSS from "ali-oss"; -const client = new OSS(); +const client = new OSS({ + accessKeyId: 'your access key', + accessKeySecret: 'your access secret', + bucket: 'your bucket name', + region: 'oss-cn-hangzhou' +}); + diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index fc0ff41ae1..9f5530db71 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -6,7 +6,19 @@ // general type -export type Bucket = { +export interface Options { + accessKeyId: string, // access secret you create + accessKeySecret: string, // access secret you create + stsToken?: string, // used by temporary authorization + bucket?: string, // the default bucket you want to access If you don't have any bucket, please use putBucket() create one first. + endpoint?: string, // oss region domain. It takes priority over region. + region?: string, // the bucket data region location, please see Data Regions, default is oss-cn-hangzhou. + internal?: boolean, // access OSS with aliyun internal network or not, default is false. If your servers are running on aliyun too, you can set true to save lot of money. + secure?: boolean, // instruct OSS client to use HTTPS (secure: true) or HTTP (secure: false) protocol. + timeout?: string | number // instance level timeout for all operations, default is 60s +} + +export type Bucket = { } @@ -16,14 +28,14 @@ export type ACLType = "public-read-write" | "public-read" | "and private" export type HTTPMethods = "GET" | "POST" | "DELETE" | "PUT"; -export type RequestOptions = { +export interface RequestOptions { // the operation timeout timeout?: number } export type RuleStatusType = "Enabled" | "Disabled" -export type LifecycleRule = { +export interface LifecycleRule { id?: string, // rule id, if not set, OSS will auto create it with random string. prefix: string, // store prefix status: RuleStatusType, // rule status, allow values: Enabled or Disabled @@ -31,7 +43,7 @@ export type LifecycleRule = { date: string // expire date, e.g.: 2022-10-11T00:00:00.000Z date and days only set one. } -export type CORSRule = { +export interface CORSRule { allowedOrigin: string | Array, // configure for Access-Control-Allow-Origin header allowedMethod: string | Array, // configure for Access-Control-Allow-Methods header allowedHeader?: string | Array, // configure for Access-Control-Allow-Headers header @@ -39,12 +51,12 @@ export type CORSRule = { maxAgeSeconds?: string | Array, // configure for Access-Control-Max-Age header } -export type OwnerType = { +export interface OwnerType { id: string, displayName: string } -export type ObjectMeta = { +export interface ObjectMeta { name: string, // object name on oss lastModified: string, // object last modified GMT date, e.g.: 2015-02-19T08:39:44.000Z etag: string, // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" @@ -54,7 +66,7 @@ export type ObjectMeta = { owner: OwnerType, } -export type NormalSuccessResponse = { +export interface NormalSuccessResponse { //response status status: number, // response headers @@ -65,12 +77,12 @@ export type NormalSuccessResponse = { rt: number } -export type UserMeta = { +export interface UserMeta { uid: number, pid: number } -export type ObjectCallback = { +export interface ObjectCallback { url: string, // After a file is uploaded successfully, the OSS sends a callback request to this URL. host?: string, // The host header value for initiating callback requests. body: string, // The value of the request body when a callback is initiated, for example, key=$(key)&etag=$(etag)&my_var=$(x:my_var). @@ -79,12 +91,12 @@ export type ObjectCallback = { headers?: object // extra headers, detail see RFC 2616 } -export type ModifyData = { +export interface ModifyData { lastModified: string, // object last modified GMT string etag: string // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" } -export type Checkpoint = { +export interface Checkpoint { file: any, // The file object selected by the user, if the browser is restarted, it needs the user to manually trigger the settings name: string, // object key fileSize: number, @@ -93,44 +105,58 @@ export type Checkpoint = { doneParts: Array<{ number: number, etag: string }> } -export type ObjectPart = { +export interface ObjectPart { PartNumber: number, LastModified: any, // {Date} Time when a part is uploaded. ETag: string, size: number } -export type Upload = { +export interface Upload { name: string, uploadId: string, initiated: any } +export interface Channel { + Name: string, + Description: string, + Status: string, + LastModified: string, + PublishUrls: Array, + PlayUrls: Array +} + +export interface ChannelHistory { + StartTime: string, // + EndTime: string, + RemoteAddr: string // the remote addr +} // parameters type -export type ListBucketsQueryType = { +export interface ListBucketsQueryType { prefix?: string, // search buckets using prefix key marker?: string, // search start from marker, including marker key 'max-keys'?: string | number // max buckets, default is 100, limit to 1000 } -export type PutBucketOptions = { +export interface PutBucketOptions { timeout: number, storageClass: StorageType } -export type PutBucketWebsiteConfig = { +export interface PutBucketWebsiteConfig { index: string, // default page, e.g.: index.html error?: string // error page, e.g.: 'error.html' } -export type ListObjectsQuery = { +export interface ListObjectsQuery { prefix?: string, // search object using prefix key marker?: string, // search start from marker, including marker key delimiter?: string, // delimiter search scope e.g. / only search current dir, not including subdir 'max-keys': string | number // max objects, default is 100, limit to 1000 } -export type ListObjectResult = { +export interface ListObjectResult { objects: Array, prefixes: Array, isTruncated: boolean, @@ -138,20 +164,20 @@ export type ListObjectResult = { res: NormalSuccessResponse } -export type PutObjectOptions = { +export interface PutObjectOptions { timeout?: number, // the operation timeout mime?: string, // custom mime, will send with Content-Type entity header meta?: UserMeta, // user meta, will send with x-oss-meta- prefix string e.g.: { uid: 123, pid: 110 } callback: ObjectCallback, } -export type PutObjectResult = { +export interface PutObjectResult { name: string, data: object, res: NormalSuccessResponse } -export type PutStreamOptions = { +export interface PutStreamOptions { contentLength?: number, // the stream length, chunked encoding will be used if absent timeout: number, // the operation timeout mime: string, // custom mime, will send with Content-Type entity header @@ -159,7 +185,7 @@ export type PutStreamOptions = { callback: ObjectCallback } -export type AppendObjectOptions = { +export interface AppendObjectOptions { position?: string, // specify the position which is the content length of the latest object timeout?: number, // the operation timeout mime?: string, // custom mime, will send with Content-Type entity header @@ -167,74 +193,74 @@ export type AppendObjectOptions = { headers?: object } -export type AppendObjectResult = { +export interface AppendObjectResult { name: string, url: string, // the url of oss res: NormalSuccessResponse, nextAppendPosition: string, // the next position } -export type HeadObjectOptions = { +export interface HeadObjectOptions { timeout?: number, headers?: object } -export type HeadObjectResult = { +export interface HeadObjectResult { status: number, // response status, maybe 200 or 304 meta: UserMeta, res: NormalSuccessResponse } -export type GetObjectOptions = { +export interface GetObjectOptions { timeout?: number, process?: string, // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} headers?: object } -export type GetObjectResult = { +export interface GetObjectResult { content?: any, // file content buffer if file parameter is null or ignore res: NormalSuccessResponse } -export type GetStreamOptions = { +export interface GetStreamOptions { timeout?: number, process?: string, // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} headers?: object } -export type GetStreamResult = { +export interface GetStreamResult { stream?: any, // readable stream instance if response status is not 200, stream will be null. res: NormalSuccessResponse } -export type CopyObjectOptions = { +export interface CopyObjectOptions { timeout?: number, meta?: UserMeta, headers?: object } -export type CopyAndPutMetaResult = { +export interface CopyAndPutMetaResult { data: ModifyData, res: NormalSuccessResponse } -export type DeleteMultiOptions = { +export interface DeleteMultiOptions { quite?: boolean // quiet mode or verbose mode, default is false, verbose mode quiet mode: if all objects delete succes, return emtpy response. otherwise return delete error object results. verbose mode: return all object delete results. timeout?: number } -export type DeleteMultiResult = { +export interface DeleteMultiResult { deleted?: Array // deleted object names list res: NormalSuccessResponse } -export type ResponseHeaderType = { +export interface ResponseHeaderType { 'content-type'?: string, 'content-disposition'? :string, 'cache-control'?: string } -export type SignatureUrlOptions = { +export interface SignatureUrlOptions { expires?: number, // after expires seconds, the url will become invalid, default is 1800 method?: HTTPMethods, // the HTTP method, default is 'GET' 'Content-Type'?: string, // set the request content type @@ -243,38 +269,38 @@ export type SignatureUrlOptions = { callback?: ObjectCallback } -export type GetACLResult = { +export interface GetACLResult { acl: ACLType, res: NormalSuccessResponse } -export type InitMultipartUploadOptions = { +export interface InitMultipartUploadOptions { timeout?: number, mime?: string, // Mime file type meta?: UserMeta, headers?: object } -export type InitMultipartUploadResult = { +export interface InitMultipartUploadResult { res: { status: number, headers: object, size: number, rt: number } bucket: string, // bucket name name: string, // object name store on OSS uploadId: string, // upload id, use for uploadPart, completeMultipart } -export type UploadPartResult = { +export interface UploadPartResult { name: string, etag: string, res: NormalSuccessResponse } -export type CompleteMultipartUploadOptions = { +export interface CompleteMultipartUploadOptions { timeout?: number, callback?: ObjectCallback, headers?: object } -export type CompleteMultipartUploadResult = { +export interface CompleteMultipartUploadResult { bucket: string, name: string, etag: string, @@ -282,7 +308,7 @@ export type CompleteMultipartUploadResult = { res: NormalSuccessResponse } -export type MultipartUploadOptions = { +export interface MultipartUploadOptions { parallel?: number, // the number of parts to be uploaded in parallel partSize?: number, // the suggested size for each part progress?: Function, // the progress callback called after each successful upload of one part, it will be given three parameters: (percentage {Number}, checkpoint {Object}, res {Object}) @@ -295,7 +321,7 @@ export type MultipartUploadOptions = { copyheaders?: object, // {Object} only uploadPartCopy api used, detail } -export type MultipartUploadResult = { +export interface MultipartUploadResult { bucket: string, name: string, etag: string, @@ -303,27 +329,27 @@ export type MultipartUploadResult = { res: NormalSuccessResponse } -export type MultipartUploadCopyResult = { +export interface MultipartUploadCopyResult { bucket: string, name: string, etag: string, res: NormalSuccessResponse } -export type MultipartUploadCopySourceData = { +export interface MultipartUploadCopySourceData { sourceKey: string, // the source object name sourceBucketName: string, // sourceData. the source bucket name startOffset: number, // data copy start byte offset, e.g: 0 endOffset: number // data copy end byte offset, e.g: 102400 } -export type ListPartsQuery = { +export interface ListPartsQuery { 'max-parts': number, // The maximum part number in the response of the OSS. default value: 1000. 'part-number-marker': number, // Starting position of a specific list. A part is listed only when the part number is greater than the value of this parameter. 'encoding-type': string // Specify the encoding of the returned content and the encoding type. Optional value: url } -export type ListPartsResult = { +export interface ListPartsResult { uploadId: string, bucket: string, name: string, @@ -335,14 +361,14 @@ export type ListPartsResult = { res: NormalSuccessResponse } -export type ListUploadsQuery = { +export interface ListUploadsQuery { prefix?: string, 'max-uploads'?: number, 'key-marker'?: string, 'upload-id-marker'?: string } -export type ListUploadsResult = { +export interface ListUploadsResult { res: NormalSuccessResponse, bucket: string, nextKeyMarker: any, @@ -351,9 +377,62 @@ export type ListUploadsResult = { uploads: Array } +export interface PutChannelConf { + Description?: string, + Status?: string, + Target?: { + Type: string, + FragDuration: number, + FragCount: number, + PlaylistName: string + } +} + +export interface PutChannelResult { + publishUrls: Array, + playUrls: Array, + res: NormalSuccessResponse +} + +export interface GetChannelResult { + Status: string, + ConnectedTime?: string, + RemoteAddr?: string, + Video?: object, + Audio?: object, + res: NormalSuccessResponse +} + +export interface ListChannelsQuery { + prefix: string, // the channel id prefix (returns channels with this prefix) + marker: string, // the channle id marker (returns channels after this id) + 'max-keys ': number // max number of channels to return +} + +export interface ListChannelsResult { + channels: Array + nextMarker: string | null, + isTruncated: boolean, + res: NormalSuccessResponse +} + +export interface ChannelHistoryResult { + records: ChannelHistory, + res: NormalSuccessResponse +} + +export interface GetRtmpUrlOptions { + expires?: number, // the expire time in seconds of the url + params?: object, // the additional paramters for url, e.g.: {playlistName: 'play.m3u8'} + timeout?: number // the operation timeout +} + export default class OSS { // the image client static ImageClient: any + + constructor(options: Options) + /******************************************* the bucket operations *************************************************/ // base operators @@ -683,7 +762,7 @@ export default class OSS { * @param {RequestOptions} options * @return {Promise} */ - getACL(name:string, options?: RequestOptions): Promise + getACL(name: string, options?: RequestOptions): Promise /** * Restore Object. @@ -736,7 +815,7 @@ export default class OSS { * @param {CompleteMultipartUploadOptions} options * @return {Promise} */ - completeMultipartUpload(name: string, uploadId: string, parts: Array<{ number: number, etag: string }>, options?:CompleteMultipartUploadOptions): Promise + completeMultipartUpload(name: string, uploadId: string, parts: Array<{ number: number, etag: string }>, options?: CompleteMultipartUploadOptions): Promise /** * Upload file with OSS multipart. @@ -788,4 +867,80 @@ export default class OSS { abortMultipartUpload(name: string, uploadId: string, options?: RequestOptions): Promise /************************************************ RTMP Operations *************************************************************/ + /** + * Create a live channel. + * @param {string} id + * @param {PutChannelConf} conf + * @param {RequestOptions} options + * @return {Promise} + */ + putChannel(id: string, conf: PutChannelConf, options?: RequestOptions): Promise + + /** + * Get live channel info. + * @param {string} id + * @param {RequestOptions} options + * @return {Promise<{data: PutChannelConf; res: NormalSuccessResponse}>} + */ + getChannel(id: string, options?: RequestOptions): Promise<{ data: PutChannelConf, res: NormalSuccessResponse }> + + /** + * Delete a live channel. + * @param {string} id + * @param {RequestOptions} options + * @return {Promise} + */ + deleteChannel(id: string, options?: RequestOptions): Promise + + /** + * Change the live channel status. + * @param {string} id + * @param {string} status + * @param {RequestOptions} options + * @return {Promise} + */ + putChannelStatus(id: string, status?: string, options?: RequestOptions): Promise + + /** + * Get the live channel status. + * @param {string} id + * @param {RequestOptions} options + * @return {Promise} + */ + getChannelStatus(id: string, options?: RequestOptions): Promise + + /** + * List channels. + * @param {ListChannelsQuery} query + * @param {RequestOptions} options + * @return {Promise} + */ + listChannels(query: ListChannelsQuery, options?: RequestOptions): Promise + + /** + * Get the live channel history. + * @param {string} id + * @param {RequestOptions} options + * @return {Promise} + */ + getChannelHistory(id: string, options?: RequestOptions): Promise + + /** + * Create a VOD playlist for the channel. + * @param {string} id + * @param {string} name + * @param {{startTime: number; endTime: number}} time + * @param {RequestOptions} options + * @return {Promise} + */ + createVod(id: string, name: string, time: { startTime: number, endTime: number }, options?: RequestOptions): Promise + + /** + * Get signatured rtmp url for publishing. + * @param {string} channelId + * @param {GetRtmpUrlOptions} options + * @return {string} + */ + getRtmpUrl(channelId?: string, options?: GetRtmpUrlOptions): string } + From 8c7758f7efe942e0f68ffa3a769e67b1b06b8e30 Mon Sep 17 00:00:00 2001 From: ptrdu Date: Sat, 29 Sep 2018 15:50:26 +0800 Subject: [PATCH 0006/1121] FEAT: add ImageClient and cluster --- types/ali-oss/Cluster.d.ts | 64 ++++++++++++++++++++++ types/ali-oss/ImageClient.d.ts | 99 ++++++++++++++++++++++++++++++++++ types/ali-oss/ali-oss-tests.ts | 9 ++++ types/ali-oss/index.d.ts | 11 +++- types/ali-oss/tsconfig.json | 2 + 5 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 types/ali-oss/Cluster.d.ts create mode 100644 types/ali-oss/ImageClient.d.ts diff --git a/types/ali-oss/Cluster.d.ts b/types/ali-oss/Cluster.d.ts new file mode 100644 index 0000000000..57ab35719b --- /dev/null +++ b/types/ali-oss/Cluster.d.ts @@ -0,0 +1,64 @@ +import { + ACLType, + CopyAndPutMetaResult, + CopyObjectOptions, + DeleteMultiOptions, + DeleteMultiResult, + GetObjectOptions, + GetObjectResult, + GetStreamOptions, + GetStreamResult, + HeadObjectOptions, + HeadObjectResult, + ListObjectResult, + ListObjectsQuery, + NormalSuccessResponse, + PutObjectOptions, + PutObjectResult, + PutStreamOptions, + RequestOptions, + SignatureUrlOptions, + UserMeta +} from "./index"; + +export interface ClusterType { + host: string, + accessKeyId: string, + accessKeySecret: string +} + +export interface ClusterOptions { + clusters: Array, + schedule?: string +} + + +export class Cluster { + constructor(options: ClusterOptions) + + list(query: ListObjectsQuery | null, options: RequestOptions): Promise + + put(name: string, file: any, options?: PutObjectOptions): Promise + + putStream(name: string, stream: any, options?: PutStreamOptions): Promise<{ name: string, res: NormalSuccessResponse }> + + head(name: string, options?: HeadObjectOptions): Promise + + get(name: string, file?: any, options?: GetObjectOptions): Promise + + getStream(name?: string, options?: GetStreamOptions): Promise + + delete(name: string, options?: RequestOptions): Promise + + copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise + + putMeta(name: string, meta: UserMeta, options: RequestOptions): Promise + + deleteMulti(names: Array, options?: DeleteMultiOptions): Promise + + signatureUrl(name: string, options?: SignatureUrlOptions): string + + putACL(name: string, acl: ACLType, options?: RequestOptions): Promise + + restore(name: string, options?: RequestOptions): Promise +} diff --git a/types/ali-oss/ImageClient.d.ts b/types/ali-oss/ImageClient.d.ts new file mode 100644 index 0000000000..ec6ec9b71a --- /dev/null +++ b/types/ali-oss/ImageClient.d.ts @@ -0,0 +1,99 @@ +import {NormalSuccessResponse, RequestOptions} from "./index"; + +export interface Options { + imageHost: string, // your image service domain that binding to a OSS bucket + accessKeyId: string, // access key you create on aliyun console website + accessKeySecret: string, // access secret you create + bucket: string, // the default bucket you want to access If you don't have any bucket, please use putBucket() create one first. + region?: string, // the bucket data region location, please see Data Regions, default is oss-cn-hangzhou Current available: oss-cn-hangzhou, oss-cn-qingdao, oss-cn-beijing, oss-cn-hongkong and oss-cn-shenzhen + internal?: boolean, // access OSS with aliyun internal network or not, default is false If your servers are running on aliyun too, you can set true to save lot of money. + timeout?: string | number, // instance level timeout for all operations, default is 60s +} + +export interface ImageGetOptions { + timeout?: number, + headers?: object +} + +export interface StyleData { + Name: string, // style name + Content: string, // style content + CreateTime: string, // style create time + LastModifyTime: string // style last modify time +} +export class Client { + constructor(options: Options) + + /** + * Get an image from the image channel. + * @param {string} name + * @param file - String|WriteStream} file path or WriteStream instance to store the image If file is null or ignore this parameter, function will return info contains content property. + * @param {ImageGetOptions} options + * @return {Promise<{content: any; res: NormalSuccessResponse}>} + */ + get(name: string, file?: any, options?: ImageGetOptions): Promise<{ content: any, res: NormalSuccessResponse }> + + /** + * Get an image read stream. + * @param {string} name + * @param {ImageGetOptions} options + * @return {Promise<{stream: any; res: NormalSuccessResponse}>} + */ + getStream(name: string, options?: ImageGetOptions): Promise<{ stream: any, res: NormalSuccessResponse }> + + /** + * Get a image exif info by image object name from the image channel. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise<{data: object; res: NormalSuccessResponse}>} + */ + getExif(name: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }> + + /** + * Get a image info and exif info by image object name from the image channel. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise<{data: object; res: NormalSuccessResponse}>} + */ + getInfo(name: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }> + + /** + * todo + * @param {string} name + * @param {string} style + * @param {RequestOptions} options + * @return {Promise<{data: object; res: NormalSuccessResponse}>} + */ + putStyle(name: string, style: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }> + + /** + * Get a style by name from the image channel. + * @param {string} name + * @param {RequestOptions} options + * @return {Promise<{data: StyleData; res: NormalSuccessResponse}>} + */ + getStyle(name: string, options?: RequestOptions): Promise<{ data: StyleData, res: NormalSuccessResponse}> + + /** + * Get all styles from the image channel. + * @param {RequestOptions} options + * @return {Promise>} + */ + listStyle(options?: RequestOptions): Promise> + + /** + * todo + * @param {string} styleName + * @param {RequestOptions} options + * @return {Promise} + */ + deleteStyle(styleName: string, options?: RequestOptions): Promise + + /** + * Create a signature url for directly download. + * @param {string} name + * @param {{expires?: string; timeout?: string}} options + * @return {string} + */ + signatureUrl(name: string, options?: { expires?: string, timeout?: string }): string +} diff --git a/types/ali-oss/ali-oss-tests.ts b/types/ali-oss/ali-oss-tests.ts index 82941c1e5e..e441e15577 100644 --- a/types/ali-oss/ali-oss-tests.ts +++ b/types/ali-oss/ali-oss-tests.ts @@ -7,3 +7,12 @@ const client = new OSS({ region: 'oss-cn-hangzhou' }); +const ImageClient = OSS.ImageClient({ + imageHost: 'xxxx', + accessKeySecret: "xxxx", + accessKeyId: 'xxxxxx', + bucket: "", + internal: false, + region: "", + timeout: undefined +}) diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index 9f5530db71..1ced1efaf8 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -6,6 +6,9 @@ // general type +import * as ImageClientDefinition from './ImageClient' +import * as ClusterDefinition from "./Cluster" + export interface Options { accessKeyId: string, // access secret you create accessKeySecret: string, // access secret you create @@ -427,9 +430,14 @@ export interface GetRtmpUrlOptions { timeout?: number // the operation timeout } +export interface ObjectInterface { + +} + export default class OSS { // the image client - static ImageClient: any + public static ImageClient: (options: ImageClientDefinition.Options) => ImageClientDefinition.Client + public static Cluster: (options: ClusterDefinition.ClusterOptions) => ClusterDefinition.Cluster constructor(options: Options) @@ -942,5 +950,6 @@ export default class OSS { * @return {string} */ getRtmpUrl(channelId?: string, options?: GetRtmpUrlOptions): string + } diff --git a/types/ali-oss/tsconfig.json b/types/ali-oss/tsconfig.json index a3e68ada2b..b6f46ae8e8 100644 --- a/types/ali-oss/tsconfig.json +++ b/types/ali-oss/tsconfig.json @@ -18,6 +18,8 @@ }, "files": [ "index.d.ts", + "ImageClient.d.ts", + "Cluster.d.ts", "ali-oss-tests.ts" ] } From c56edf64cc154e9aa4d7efad94f7aa01ee1b585c Mon Sep 17 00:00:00 2001 From: ptrdu Date: Sat, 29 Sep 2018 17:49:53 +0800 Subject: [PATCH 0007/1121] FEAT: add test --- types/ali-oss/ImageClient.d.ts | 8 ++++---- types/ali-oss/ali-oss-tests.ts | 27 ++++++++++++++++++++++----- types/ali-oss/index.d.ts | 19 +++++++++++-------- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/types/ali-oss/ImageClient.d.ts b/types/ali-oss/ImageClient.d.ts index ec6ec9b71a..047077904f 100644 --- a/types/ali-oss/ImageClient.d.ts +++ b/types/ali-oss/ImageClient.d.ts @@ -1,6 +1,6 @@ -import {NormalSuccessResponse, RequestOptions} from "./index"; +import { NormalSuccessResponse, RequestOptions } from "./index"; -export interface Options { +export interface ImageClientOptions { imageHost: string, // your image service domain that binding to a OSS bucket accessKeyId: string, // access key you create on aliyun console website accessKeySecret: string, // access secret you create @@ -21,8 +21,8 @@ export interface StyleData { CreateTime: string, // style create time LastModifyTime: string // style last modify time } -export class Client { - constructor(options: Options) +export class ImageClient { + constructor(options: ImageClientOptions) /** * Get an image from the image channel. diff --git a/types/ali-oss/ali-oss-tests.ts b/types/ali-oss/ali-oss-tests.ts index e441e15577..a9c39ab199 100644 --- a/types/ali-oss/ali-oss-tests.ts +++ b/types/ali-oss/ali-oss-tests.ts @@ -5,14 +5,31 @@ const client = new OSS({ accessKeySecret: 'your access secret', bucket: 'your bucket name', region: 'oss-cn-hangzhou' -}); +}) + const ImageClient = OSS.ImageClient({ - imageHost: 'xxxx', - accessKeySecret: "xxxx", - accessKeyId: 'xxxxxx', + imageHost: 'host', + accessKeySecret: "secret", + accessKeyId: 'id', bucket: "", internal: false, region: "", - timeout: undefined + timeout: 2000 +}) + +const cluster = OSS.Cluster({ + clusters: [ + { + accessKeyId: 'id', + accessKeySecret: 'secret', + host: "" + }, + { + accessKeyId: 'id', + accessKeySecret: 'secret', + host: "" + }, + ], + schedule: 'masterSlave', }) diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index 1ced1efaf8..0f17bbb142 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -8,6 +8,10 @@ import * as ImageClientDefinition from './ImageClient' import * as ClusterDefinition from "./Cluster" +import {ImageClient} from "./ImageClient"; + +export * from './ImageClient' +export * from './Cluster' export interface Options { accessKeyId: string, // access secret you create @@ -22,7 +26,10 @@ export interface Options { } export type Bucket = { - + name: string, + region: string, + creationDate: string, + StorageClass: StorageType } export type StorageType = "Standard" | "IA" | "Archive" @@ -430,13 +437,9 @@ export interface GetRtmpUrlOptions { timeout?: number // the operation timeout } -export interface ObjectInterface { - -} - export default class OSS { // the image client - public static ImageClient: (options: ImageClientDefinition.Options) => ImageClientDefinition.Client + public static ImageClient: (options: ImageClientDefinition.ImageClientOptions) => ImageClientDefinition.ImageClient public static Cluster: (options: ClusterDefinition.ClusterOptions) => ClusterDefinition.Cluster constructor(options: Options) @@ -455,7 +458,8 @@ export default class OSS { /** * Create a new bucket. - * @param {string} name - bucket name If bucket exists and not belong to current account, will throw BucketAlreadyExistsError. If bucket not exists, will create a new bucket and set it's ACL. + * @param {string} name - bucket name If bucket exists and not belong to current account, will throw BucketAlreadyExistsError. + * If bucket not exists, will create a new bucket and set it's ACL. * @param {PutBucketOptions} options - optional parameters * @return { Promise<{ bucket: string, res: NormalSuccessResponse }> } */ @@ -952,4 +956,3 @@ export default class OSS { getRtmpUrl(channelId?: string, options?: GetRtmpUrlOptions): string } - From 14dda1b33703537649a2e5f019d1de0c74a9148b Mon Sep 17 00:00:00 2001 From: ptrdu Date: Sat, 29 Sep 2018 18:50:18 +0800 Subject: [PATCH 0008/1121] FIX: fix some used import and the typescript version --- types/ali-oss/index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index 0f17bbb142..b7eba95d62 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -2,13 +2,10 @@ // Project: https://github.com/ali-sdk/ali-oss // Definitions by: Ptrdu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.2.0 - -// general type +// TypeScript Version: 2.3 import * as ImageClientDefinition from './ImageClient' import * as ClusterDefinition from "./Cluster" -import {ImageClient} from "./ImageClient"; export * from './ImageClient' export * from './Cluster' From 83d5d18ae729119b39a63f5c6ed3d698507fc48d Mon Sep 17 00:00:00 2001 From: ptrdu Date: Sun, 30 Sep 2018 10:17:52 +0800 Subject: [PATCH 0009/1121] FIX: fix the tsconfig and tslint error --- types/ali-oss/Cluster.d.ts | 37 +- types/ali-oss/ImageClient.d.ts | 72 +-- types/ali-oss/ali-oss-tests.ts | 7 +- types/ali-oss/index.d.ts | 823 +++++++++++++-------------------- types/ali-oss/tsconfig.json | 2 +- types/ali-oss/tslint.json | 78 +--- 6 files changed, 359 insertions(+), 660 deletions(-) diff --git a/types/ali-oss/Cluster.d.ts b/types/ali-oss/Cluster.d.ts index 57ab35719b..60886fca36 100644 --- a/types/ali-oss/Cluster.d.ts +++ b/types/ali-oss/Cluster.d.ts @@ -22,43 +22,42 @@ import { } from "./index"; export interface ClusterType { - host: string, - accessKeyId: string, - accessKeySecret: string + host: string; + accessKeyId: string; + accessKeySecret: string; } export interface ClusterOptions { - clusters: Array, - schedule?: string + clusters: ClusterType[]; + schedule?: string; } - export class Cluster { constructor(options: ClusterOptions) - list(query: ListObjectsQuery | null, options: RequestOptions): Promise + list(query: ListObjectsQuery | null, options: RequestOptions): Promise; - put(name: string, file: any, options?: PutObjectOptions): Promise + put(name: string, file: any, options?: PutObjectOptions): Promise; - putStream(name: string, stream: any, options?: PutStreamOptions): Promise<{ name: string, res: NormalSuccessResponse }> + putStream(name: string, stream: any, options?: PutStreamOptions): Promise<{ name: string, res: NormalSuccessResponse }>; - head(name: string, options?: HeadObjectOptions): Promise + head(name: string, options?: HeadObjectOptions): Promise; - get(name: string, file?: any, options?: GetObjectOptions): Promise + get(name: string, file?: any, options?: GetObjectOptions): Promise; - getStream(name?: string, options?: GetStreamOptions): Promise + getStream(name?: string, options?: GetStreamOptions): Promise; - delete(name: string, options?: RequestOptions): Promise + delete(name: string, options?: RequestOptions): Promise; - copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise + copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise; - putMeta(name: string, meta: UserMeta, options: RequestOptions): Promise + putMeta(name: string, meta: UserMeta, options: RequestOptions): Promise; - deleteMulti(names: Array, options?: DeleteMultiOptions): Promise + deleteMulti(names: string[], options?: DeleteMultiOptions): Promise; - signatureUrl(name: string, options?: SignatureUrlOptions): string + signatureUrl(name: string, options?: SignatureUrlOptions): string; - putACL(name: string, acl: ACLType, options?: RequestOptions): Promise + putACL(name: string, acl: ACLType, options?: RequestOptions): Promise; - restore(name: string, options?: RequestOptions): Promise + restore(name: string, options?: RequestOptions): Promise; } diff --git a/types/ali-oss/ImageClient.d.ts b/types/ali-oss/ImageClient.d.ts index 047077904f..850213083c 100644 --- a/types/ali-oss/ImageClient.d.ts +++ b/types/ali-oss/ImageClient.d.ts @@ -1,99 +1,71 @@ import { NormalSuccessResponse, RequestOptions } from "./index"; export interface ImageClientOptions { - imageHost: string, // your image service domain that binding to a OSS bucket - accessKeyId: string, // access key you create on aliyun console website - accessKeySecret: string, // access secret you create - bucket: string, // the default bucket you want to access If you don't have any bucket, please use putBucket() create one first. - region?: string, // the bucket data region location, please see Data Regions, default is oss-cn-hangzhou Current available: oss-cn-hangzhou, oss-cn-qingdao, oss-cn-beijing, oss-cn-hongkong and oss-cn-shenzhen - internal?: boolean, // access OSS with aliyun internal network or not, default is false If your servers are running on aliyun too, you can set true to save lot of money. - timeout?: string | number, // instance level timeout for all operations, default is 60s + imageHost: string; // your image service domain that binding to a OSS bucket + accessKeyId: string; // access key you create on aliyun console website + accessKeySecret: string; // access secret you create + bucket: string; // the default bucket you want to access If you don't have any bucket, please use putBucket() create one first. + region?: string; // the bucket data region location, please see Data Regions, default is oss-cn-hangzhou + internal?: boolean; // access OSS with aliyun internal network or not, default is false If your servers are running on aliyun too, you can set true to save lot of money. + timeout?: string | number; // instance level timeout for all operations, default is 60s } export interface ImageGetOptions { - timeout?: number, - headers?: object + timeout?: number; + headers?: object; } export interface StyleData { - Name: string, // style name - Content: string, // style content - CreateTime: string, // style create time - LastModifyTime: string // style last modify time + Name: string; // style name + Content: string; // style content + CreateTime: string; // style create time + LastModifyTime: string; // style last modify time } export class ImageClient { constructor(options: ImageClientOptions) /** * Get an image from the image channel. - * @param {string} name - * @param file - String|WriteStream} file path or WriteStream instance to store the image If file is null or ignore this parameter, function will return info contains content property. - * @param {ImageGetOptions} options - * @return {Promise<{content: any; res: NormalSuccessResponse}>} */ - get(name: string, file?: any, options?: ImageGetOptions): Promise<{ content: any, res: NormalSuccessResponse }> + get(name: string, file?: any, options?: ImageGetOptions): Promise<{ content: any, res: NormalSuccessResponse }>; /** * Get an image read stream. - * @param {string} name - * @param {ImageGetOptions} options - * @return {Promise<{stream: any; res: NormalSuccessResponse}>} */ - getStream(name: string, options?: ImageGetOptions): Promise<{ stream: any, res: NormalSuccessResponse }> + getStream(name: string, options?: ImageGetOptions): Promise<{ stream: any, res: NormalSuccessResponse }>; /** * Get a image exif info by image object name from the image channel. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise<{data: object; res: NormalSuccessResponse}>} */ - getExif(name: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }> + getExif(name: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }>; /** * Get a image info and exif info by image object name from the image channel. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise<{data: object; res: NormalSuccessResponse}>} */ - getInfo(name: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }> + getInfo(name: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }>; /** * todo - * @param {string} name - * @param {string} style - * @param {RequestOptions} options - * @return {Promise<{data: object; res: NormalSuccessResponse}>} */ - putStyle(name: string, style: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }> + putStyle(name: string, style: string, options?: RequestOptions): Promise<{ data: object, res: NormalSuccessResponse }>; /** * Get a style by name from the image channel. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise<{data: StyleData; res: NormalSuccessResponse}>} */ - getStyle(name: string, options?: RequestOptions): Promise<{ data: StyleData, res: NormalSuccessResponse}> + getStyle(name: string, options?: RequestOptions): Promise<{ data: StyleData, res: NormalSuccessResponse}>; /** * Get all styles from the image channel. - * @param {RequestOptions} options - * @return {Promise>} */ - listStyle(options?: RequestOptions): Promise> + listStyle(options?: RequestOptions): Promise; /** * todo - * @param {string} styleName - * @param {RequestOptions} options - * @return {Promise} */ - deleteStyle(styleName: string, options?: RequestOptions): Promise + deleteStyle(styleName: string, options?: RequestOptions): Promise; /** * Create a signature url for directly download. - * @param {string} name - * @param {{expires?: string; timeout?: string}} options - * @return {string} */ - signatureUrl(name: string, options?: { expires?: string, timeout?: string }): string + signatureUrl(name: string, options?: { expires?: string, timeout?: string }): string; } diff --git a/types/ali-oss/ali-oss-tests.ts b/types/ali-oss/ali-oss-tests.ts index a9c39ab199..96f817cca8 100644 --- a/types/ali-oss/ali-oss-tests.ts +++ b/types/ali-oss/ali-oss-tests.ts @@ -5,8 +5,7 @@ const client = new OSS({ accessKeySecret: 'your access secret', bucket: 'your bucket name', region: 'oss-cn-hangzhou' -}) - +}); const ImageClient = OSS.ImageClient({ imageHost: 'host', @@ -16,7 +15,7 @@ const ImageClient = OSS.ImageClient({ internal: false, region: "", timeout: 2000 -}) +}); const cluster = OSS.Cluster({ clusters: [ @@ -32,4 +31,4 @@ const cluster = OSS.Cluster({ }, ], schedule: 'masterSlave', -}) +}); diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index b7eba95d62..c3fa0dd10b 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -1,443 +1,443 @@ -// Type definitions for ali-oss 6.0.1 +// Type definitions for ali-oss 6.0 // Project: https://github.com/ali-sdk/ali-oss // Definitions by: Ptrdu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as ImageClientDefinition from './ImageClient' -import * as ClusterDefinition from "./Cluster" +import * as ImageClientDefinition from './ImageClient'; +import * as ClusterDefinition from "./Cluster"; -export * from './ImageClient' -export * from './Cluster' +export * from './ImageClient'; +export * from './Cluster'; export interface Options { - accessKeyId: string, // access secret you create - accessKeySecret: string, // access secret you create - stsToken?: string, // used by temporary authorization - bucket?: string, // the default bucket you want to access If you don't have any bucket, please use putBucket() create one first. - endpoint?: string, // oss region domain. It takes priority over region. - region?: string, // the bucket data region location, please see Data Regions, default is oss-cn-hangzhou. - internal?: boolean, // access OSS with aliyun internal network or not, default is false. If your servers are running on aliyun too, you can set true to save lot of money. - secure?: boolean, // instruct OSS client to use HTTPS (secure: true) or HTTP (secure: false) protocol. - timeout?: string | number // instance level timeout for all operations, default is 60s + accessKeyId: string; // access secret you create + accessKeySecret: string; // access secret you create + stsToken?: string; // used by temporary authorization + bucket?: string; // the default bucket you want to access If you don't have any bucket, please use putBucket() create one first. + endpoint?: string; // oss region domain. It takes priority over region. + region?: string; // the bucket data region location, please see Data Regions, default is oss-cn-hangzhou. + internal?: boolean; // access OSS with aliyun internal network or not, default is false. If your servers are running on aliyun too, you can set true to save lot of money. + secure?: boolean; // instruct OSS client to use HTTPS (secure: true) or HTTP (secure: false) protocol. + timeout?: string | number; // instance level timeout for all operations, default is 60s } -export type Bucket = { - name: string, - region: string, - creationDate: string, - StorageClass: StorageType +export interface Bucket { + name: string; + region: string; + creationDate: string; + StorageClass: StorageType; } -export type StorageType = "Standard" | "IA" | "Archive" +export type StorageType = "Standard" | "IA" | "Archive"; -export type ACLType = "public-read-write" | "public-read" | "and private" +export type ACLType = "public-read-write" | "public-read" | "and private"; export type HTTPMethods = "GET" | "POST" | "DELETE" | "PUT"; export interface RequestOptions { // the operation timeout - timeout?: number + timeout?: number; } -export type RuleStatusType = "Enabled" | "Disabled" +export type RuleStatusType = "Enabled" | "Disabled"; export interface LifecycleRule { - id?: string, // rule id, if not set, OSS will auto create it with random string. - prefix: string, // store prefix - status: RuleStatusType, // rule status, allow values: Enabled or Disabled - days?: number | string, // expire after the days - date: string // expire date, e.g.: 2022-10-11T00:00:00.000Z date and days only set one. + id?: string; // rule id, if not set, OSS will auto create it with random string. + prefix: string; // store prefix + status: RuleStatusType; // rule status, allow values: Enabled or Disabled + days?: number | string; // expire after the days + date: string; // expire date, e.g.: 2022-10-11T00:00:00.000Z date and days only set one. } export interface CORSRule { - allowedOrigin: string | Array, // configure for Access-Control-Allow-Origin header - allowedMethod: string | Array, // configure for Access-Control-Allow-Methods header - allowedHeader?: string | Array, // configure for Access-Control-Allow-Headers header - exposeHeader?: string | Array, // configure for Access-Control-Expose-Headers header - maxAgeSeconds?: string | Array, // configure for Access-Control-Max-Age header + allowedOrigin: string | string[]; // configure for Access-Control-Allow-Origin header + allowedMethod: string | string[]; // configure for Access-Control-Allow-Methods header + allowedHeader?: string | string[]; // configure for Access-Control-Allow-Headers header + exposeHeader?: string | string[]; // configure for Access-Control-Expose-Headers header + maxAgeSeconds?: string | string[]; // configure for Access-Control-Max-Age header } export interface OwnerType { - id: string, - displayName: string + id: string; + displayName: string; } export interface ObjectMeta { - name: string, // object name on oss - lastModified: string, // object last modified GMT date, e.g.: 2015-02-19T08:39:44.000Z - etag: string, // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" - type: string, // object type, e.g.: Normal - size: number, // object size, e.g.: 344606 - storageClass: StorageType, - owner: OwnerType, + name: string; // object name on oss + lastModified: string; // object last modified GMT date, e.g.: 2015-02-19T08:39:44.000Z + etag: string; // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" + type: string; // object type, e.g.: Normal + size: number; // object size, e.g.: 344606 + storageClass: StorageType; + owner: OwnerType; } export interface NormalSuccessResponse { - //response status - status: number, + // response status + status: number; // response headers - headers: object, // todo the object in detail + headers: object; // todo the object in detail // response size - size: number, + size: number; // request total use time (ms) - rt: number + rt: number; } export interface UserMeta { - uid: number, - pid: number + uid: number; + pid: number; } export interface ObjectCallback { - url: string, // After a file is uploaded successfully, the OSS sends a callback request to this URL. - host?: string, // The host header value for initiating callback requests. - body: string, // The value of the request body when a callback is initiated, for example, key=$(key)&etag=$(etag)&my_var=$(x:my_var). - contentType?: string, // The Content-Type of the callback requests initiatiated, It supports application/x-www-form-urlencoded and application/json, and the former is the default value. - customValue?: object, - headers?: object // extra headers, detail see RFC 2616 + url: string; // After a file is uploaded successfully, the OSS sends a callback request to this URL. + host?: string; // The host header value for initiating callback requests. + body: string; // The value of the request body when a callback is initiated, for example, key=$(key)&etag=$(etag)&my_var=$(x:my_var). + contentType?: string; // The Content-Type of the callback requests initiatiated, It supports application/x-www-form-urlencoded and application/json, and the former is the default value. + customValue?: object; + headers?: object; // extra headers, detail see RFC 2616 } export interface ModifyData { - lastModified: string, // object last modified GMT string - etag: string // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" + lastModified: string; // object last modified GMT string + etag: string; // object etag contains ", e.g.: "5B3C1A2E053D763E1B002CC607C5A0FE" } export interface Checkpoint { - file: any, // The file object selected by the user, if the browser is restarted, it needs the user to manually trigger the settings - name: string, // object key - fileSize: number, - partSize: number, - uploadId: string, - doneParts: Array<{ number: number, etag: string }> + file: any; // The file object selected by the user, if the browser is restarted, it needs the user to manually trigger the settings + name: string; // object key + fileSize: number; + partSize: number; + uploadId: string; + doneParts: Array<{ number: number, etag: string }>; } export interface ObjectPart { - PartNumber: number, - LastModified: any, // {Date} Time when a part is uploaded. - ETag: string, - size: number + PartNumber: number; + LastModified: any; // {Date} Time when a part is uploaded. + ETag: string; + size: number; } export interface Upload { - name: string, - uploadId: string, - initiated: any + name: string; + uploadId: string; + initiated: any; } export interface Channel { - Name: string, - Description: string, - Status: string, - LastModified: string, - PublishUrls: Array, - PlayUrls: Array + Name: string; + Description: string; + Status: string; + LastModified: string; + PublishUrls: string[]; + PlayUrls: string[]; } export interface ChannelHistory { - StartTime: string, // - EndTime: string, - RemoteAddr: string // the remote addr + StartTime: string; // + EndTime: string; + RemoteAddr: string; // the remote addr } // parameters type export interface ListBucketsQueryType { - prefix?: string, // search buckets using prefix key - marker?: string, // search start from marker, including marker key - 'max-keys'?: string | number // max buckets, default is 100, limit to 1000 + prefix?: string; // search buckets using prefix key + marker?: string; // search start from marker, including marker key + 'max-keys'?: string | number; // max buckets, default is 100, limit to 1000 } export interface PutBucketOptions { - timeout: number, - storageClass: StorageType + timeout: number; + storageClass: StorageType; } export interface PutBucketWebsiteConfig { - index: string, // default page, e.g.: index.html - error?: string // error page, e.g.: 'error.html' + index: string; // default page, e.g.: index.html + error?: string; // error page, e.g.: 'error.html' } export interface ListObjectsQuery { - prefix?: string, // search object using prefix key - marker?: string, // search start from marker, including marker key - delimiter?: string, // delimiter search scope e.g. / only search current dir, not including subdir - 'max-keys': string | number // max objects, default is 100, limit to 1000 + prefix?: string; // search object using prefix key + marker?: string; // search start from marker, including marker key + delimiter?: string; // delimiter search scope e.g. / only search current dir, not including subdir + 'max-keys': string | number; // max objects, default is 100, limit to 1000 } export interface ListObjectResult { - objects: Array, - prefixes: Array, - isTruncated: boolean, - nextMarker: string, - res: NormalSuccessResponse + objects: ObjectMeta[]; + prefixes: string[]; + isTruncated: boolean; + nextMarker: string; + res: NormalSuccessResponse; } export interface PutObjectOptions { - timeout?: number, // the operation timeout - mime?: string, // custom mime, will send with Content-Type entity header - meta?: UserMeta, // user meta, will send with x-oss-meta- prefix string e.g.: { uid: 123, pid: 110 } - callback: ObjectCallback, + timeout?: number; // the operation timeout + mime?: string; // custom mime, will send with Content-Type entity header + meta?: UserMeta; // user meta, will send with x-oss-meta- prefix string e.g.: { uid: 123, pid: 110 } + callback: ObjectCallback; } export interface PutObjectResult { - name: string, - data: object, - res: NormalSuccessResponse + name: string; + data: object; + res: NormalSuccessResponse; } export interface PutStreamOptions { - contentLength?: number, // the stream length, chunked encoding will be used if absent - timeout: number, // the operation timeout - mime: string, // custom mime, will send with Content-Type entity header - meta: UserMeta, - callback: ObjectCallback + contentLength?: number; // the stream length, chunked encoding will be used if absent + timeout: number; // the operation timeout + mime: string; // custom mime, will send with Content-Type entity header + meta: UserMeta; + callback: ObjectCallback; } export interface AppendObjectOptions { - position?: string, // specify the position which is the content length of the latest object - timeout?: number, // the operation timeout - mime?: string, // custom mime, will send with Content-Type entity header - meta?: UserMeta, - headers?: object + position?: string; // specify the position which is the content length of the latest object + timeout?: number; // the operation timeout + mime?: string; // custom mime, will send with Content-Type entity header + meta?: UserMeta; + headers?: object; } export interface AppendObjectResult { - name: string, - url: string, // the url of oss - res: NormalSuccessResponse, - nextAppendPosition: string, // the next position + name: string; + url: string; // the url of oss + res: NormalSuccessResponse; + nextAppendPosition: string; // the next position } export interface HeadObjectOptions { - timeout?: number, - headers?: object + timeout?: number; + headers?: object; } export interface HeadObjectResult { - status: number, // response status, maybe 200 or 304 - meta: UserMeta, - res: NormalSuccessResponse + status: number; // response status, maybe 200 or 304 + meta: UserMeta; + res: NormalSuccessResponse; } export interface GetObjectOptions { - timeout?: number, - process?: string, // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} - headers?: object + timeout?: number; + process?: string; // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} + headers?: object; } export interface GetObjectResult { - content?: any, // file content buffer if file parameter is null or ignore - res: NormalSuccessResponse + content?: any; // file content buffer if file parameter is null or ignore + res: NormalSuccessResponse; } export interface GetStreamOptions { - timeout?: number, - process?: string, // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} - headers?: object + timeout?: number; + process?: string; // image process params, will send with x-oss-process e.g.: {process: 'image/resize,w_200'} + headers?: object; } export interface GetStreamResult { - stream?: any, // readable stream instance if response status is not 200, stream will be null. - res: NormalSuccessResponse + stream?: any; // readable stream instance if response status is not 200, stream will be null. + res: NormalSuccessResponse; } export interface CopyObjectOptions { - timeout?: number, - meta?: UserMeta, - headers?: object + timeout?: number; + meta?: UserMeta; + headers?: object; } export interface CopyAndPutMetaResult { - data: ModifyData, - res: NormalSuccessResponse + data: ModifyData; + res: NormalSuccessResponse; } export interface DeleteMultiOptions { - quite?: boolean // quiet mode or verbose mode, default is false, verbose mode quiet mode: if all objects delete succes, return emtpy response. otherwise return delete error object results. verbose mode: return all object delete results. - timeout?: number + quite?: boolean; // quiet mode or verbose mode, default is false + timeout?: number; } export interface DeleteMultiResult { - deleted?: Array // deleted object names list - res: NormalSuccessResponse + deleted?: string[]; // deleted object names list + res: NormalSuccessResponse; } export interface ResponseHeaderType { - 'content-type'?: string, - 'content-disposition'? :string, - 'cache-control'?: string + 'content-type'?: string; + 'content-disposition'?: string; + 'cache-control'?: string; } export interface SignatureUrlOptions { - expires?: number, // after expires seconds, the url will become invalid, default is 1800 - method?: HTTPMethods, // the HTTP method, default is 'GET' - 'Content-Type'?: string, // set the request content type - process?: string, - response?: ResponseHeaderType, // set the response headers for download - callback?: ObjectCallback + expires?: number; // after expires seconds, the url will become invalid, default is 1800 + method?: HTTPMethods; // the HTTP method, default is 'GET' + 'Content-Type'?: string; // set the request content type + process?: string; + response?: ResponseHeaderType; // set the response headers for download + callback?: ObjectCallback; } export interface GetACLResult { - acl: ACLType, - res: NormalSuccessResponse + acl: ACLType; + res: NormalSuccessResponse; } export interface InitMultipartUploadOptions { - timeout?: number, - mime?: string, // Mime file type - meta?: UserMeta, - headers?: object + timeout?: number; + mime?: string; // Mime file type + meta?: UserMeta; + headers?: object; } export interface InitMultipartUploadResult { - res: { status: number, headers: object, size: number, rt: number } - bucket: string, // bucket name - name: string, // object name store on OSS - uploadId: string, // upload id, use for uploadPart, completeMultipart + res: { status: number, headers: object, size: number, rt: number }; + bucket: string; // bucket name + name: string; // object name store on OSS + uploadId: string; // upload id, use for uploadPart, completeMultipart } export interface UploadPartResult { - name: string, - etag: string, - res: NormalSuccessResponse + name: string; + etag: string; + res: NormalSuccessResponse; } export interface CompleteMultipartUploadOptions { - timeout?: number, - callback?: ObjectCallback, - headers?: object + timeout?: number; + callback?: ObjectCallback; + headers?: object; } export interface CompleteMultipartUploadResult { - bucket: string, - name: string, - etag: string, - data: object, - res: NormalSuccessResponse + bucket: string; + name: string; + etag: string; + data: object; + res: NormalSuccessResponse; } export interface MultipartUploadOptions { - parallel?: number, // the number of parts to be uploaded in parallel - partSize?: number, // the suggested size for each part - progress?: Function, // the progress callback called after each successful upload of one part, it will be given three parameters: (percentage {Number}, checkpoint {Object}, res {Object}) - checkpoint?: Checkpoint, // the checkpoint to resume upload, if this is provided, it will continue the upload from where interrupted, otherwise a new multipart upload will be created. - meta?: UserMeta, - mime?: string, - callback?: ObjectCallback, - headers?: object, - timeout?: number - copyheaders?: object, // {Object} only uploadPartCopy api used, detail + parallel?: number; // the number of parts to be uploaded in parallel + partSize?: number; // the suggested size for each part + progress?: (...args: any[]) => any; // the progress callback called after each successful upload of one part + checkpoint?: Checkpoint; // the checkpoint to resume upload, if this is provided, it will continue the upload from where interrupted, otherwise a new multipart upload will be created. + meta?: UserMeta; + mime?: string; + callback?: ObjectCallback; + headers?: object; + timeout?: number; + copyheaders?: object; // {Object} only uploadPartCopy api used, detail } export interface MultipartUploadResult { - bucket: string, - name: string, - etag: string, - data: object, - res: NormalSuccessResponse + bucket: string; + name: string; + etag: string; + data: object; + res: NormalSuccessResponse; } export interface MultipartUploadCopyResult { - bucket: string, - name: string, - etag: string, - res: NormalSuccessResponse + bucket: string; + name: string; + etag: string; + res: NormalSuccessResponse; } export interface MultipartUploadCopySourceData { - sourceKey: string, // the source object name - sourceBucketName: string, // sourceData. the source bucket name - startOffset: number, // data copy start byte offset, e.g: 0 - endOffset: number // data copy end byte offset, e.g: 102400 + sourceKey: string; // the source object name + sourceBucketName: string; // sourceData. the source bucket name + startOffset: number; // data copy start byte offset, e.g: 0 + endOffset: number; // data copy end byte offset, e.g: 102400 } export interface ListPartsQuery { - 'max-parts': number, // The maximum part number in the response of the OSS. default value: 1000. - 'part-number-marker': number, // Starting position of a specific list. A part is listed only when the part number is greater than the value of this parameter. - 'encoding-type': string // Specify the encoding of the returned content and the encoding type. Optional value: url + 'max-parts': number; // The maximum part number in the response of the OSS. default value: 1000. + 'part-number-marker': number; // Starting position of a specific list. A part is listed only when the part number is greater than the value of this parameter. + 'encoding-type': string; // Specify the encoding of the returned content and the encoding type. Optional value: url } export interface ListPartsResult { - uploadId: string, - bucket: string, - name: string, - PartNumberMarker: number, - nextPartNumberMarker: number, - maxParts: number, - isTruncated: boolean, - parts: Array, - res: NormalSuccessResponse + uploadId: string; + bucket: string; + name: string; + PartNumberMarker: number; + nextPartNumberMarker: number; + maxParts: number; + isTruncated: boolean; + parts: ObjectPart[]; + res: NormalSuccessResponse; } export interface ListUploadsQuery { - prefix?: string, - 'max-uploads'?: number, - 'key-marker'?: string, - 'upload-id-marker'?: string + prefix?: string; + 'max-uploads'?: number; + 'key-marker'?: string; + 'upload-id-marker'?: string; } export interface ListUploadsResult { - res: NormalSuccessResponse, - bucket: string, - nextKeyMarker: any, - nextUploadIdMarker: any, - isTruncated: boolean, - uploads: Array + res: NormalSuccessResponse; + bucket: string; + nextKeyMarker: any; + nextUploadIdMarker: any; + isTruncated: boolean; + uploads: Upload[]; } export interface PutChannelConf { - Description?: string, - Status?: string, + Description?: string; + Status?: string; Target?: { Type: string, FragDuration: number, FragCount: number, PlaylistName: string - } + }; } export interface PutChannelResult { - publishUrls: Array, - playUrls: Array, - res: NormalSuccessResponse + publishUrls: string[]; + playUrls: string[]; + res: NormalSuccessResponse; } export interface GetChannelResult { - Status: string, - ConnectedTime?: string, - RemoteAddr?: string, - Video?: object, - Audio?: object, - res: NormalSuccessResponse + Status: string; + ConnectedTime?: string; + RemoteAddr?: string; + Video?: object; + Audio?: object; + res: NormalSuccessResponse; } export interface ListChannelsQuery { - prefix: string, // the channel id prefix (returns channels with this prefix) - marker: string, // the channle id marker (returns channels after this id) - 'max-keys ': number // max number of channels to return + prefix: string; // the channel id prefix (returns channels with this prefix) + marker: string; // the channel id marker (returns channels after this id) + 'max-keys ': number; // max number of channels to return } export interface ListChannelsResult { - channels: Array - nextMarker: string | null, - isTruncated: boolean, - res: NormalSuccessResponse + channels: Channel[]; + nextMarker: string | null; + isTruncated: boolean; + res: NormalSuccessResponse; } export interface ChannelHistoryResult { - records: ChannelHistory, - res: NormalSuccessResponse + records: ChannelHistory; + res: NormalSuccessResponse; } export interface GetRtmpUrlOptions { - expires?: number, // the expire time in seconds of the url - params?: object, // the additional paramters for url, e.g.: {playlistName: 'play.m3u8'} - timeout?: number // the operation timeout + expires?: number; // the expire time in seconds of the url + params?: object; // the additional parameters for url, e.g.: {playlistName: 'play.m3u8'} + timeout?: number; // the operation timeout } export default class OSS { // the image client - public static ImageClient: (options: ImageClientDefinition.ImageClientOptions) => ImageClientDefinition.ImageClient - public static Cluster: (options: ClusterDefinition.ClusterOptions) => ClusterDefinition.Cluster + static ImageClient: (options: ImageClientDefinition.ImageClientOptions) => ImageClientDefinition.ImageClient; + static Cluster: (options: ClusterDefinition.ClusterOptions) => ClusterDefinition.Cluster; constructor(options: Options) @@ -446,510 +446,315 @@ export default class OSS { // base operators /** * List buckets in this account. - * @param {ListBucketsQueryType | null} query - query parameters, default is null - * @param {RequestOptions} options - optional parameters - * timeout - the operation timeout - * @return {Promise>} */ - listBuckets(query: ListBucketsQueryType | null, options?: RequestOptions): Promise> + listBuckets(query: ListBucketsQueryType | null, options?: RequestOptions): Promise; /** * Create a new bucket. - * @param {string} name - bucket name If bucket exists and not belong to current account, will throw BucketAlreadyExistsError. - * If bucket not exists, will create a new bucket and set it's ACL. - * @param {PutBucketOptions} options - optional parameters - * @return { Promise<{ bucket: string, res: NormalSuccessResponse }> } */ - putBucket(name: string, options?: PutBucketOptions): Promise<{ bucket: string, res: NormalSuccessResponse }> + putBucket(name: string, options?: PutBucketOptions): Promise<{ bucket: string, res: NormalSuccessResponse }>; /** * Use the bucket. - * @param {string} name - bucket name */ - useBucket(name: string): void + useBucket(name: string): void; /** * Delete an empty bucket. - * @param {string} name - bucket name If bucket is not empty, will throw BucketNotEmptyError. If bucket is not exists, will throw NoSuchBucketError. - * @param {RequestOptions} options - * @return {Promise} */ - deleteBucket(name: string, options?: RequestOptions): Promise + deleteBucket(name: string, options?: RequestOptions): Promise; /** * Get bucket information,include CreationDate、ExtranetEndpoint、IntranetEndpoint、Location、Name、StorageClass、 Owner、AccessControlList - * @param {string} name - bucket name - * @return {Promise} // todo the official document miss the return type */ - getBucketInfo(name: string): Promise + getBucketInfo(name: string): Promise; /** * Get bucket location - * @param {string} name - bucket name - * @return {Promise} // todo the official document miss the return type */ - getBucketLocation(name: string): Promise + getBucketLocation(name: string): Promise; // ACL operations /** * Update the bucket ACL. - * @param {string} name - bucket name - * @param {ACLType} acl - access control list, current available: public-read-write, public-read and private - * @param {RequestOptions} options - * @return {Promise} */ - putBucketACL(name: string, acl: ACLType, options?: RequestOptions): Promise + putBucketACL(name: string, acl: ACLType, options?: RequestOptions): Promise; /** * Get the bucket ACL. - * @param {string} name - bucket name - * @param {RequestOptions} options - * @return {Promise<{ acl: string, res: NormalSuccessResponse }>} * acl - acl settings string */ - getBucketACL(name: string, options?: RequestOptions): Promise<{ acl: string, res: NormalSuccessResponse }> + getBucketACL(name: string, options?: RequestOptions): Promise<{ acl: string, res: NormalSuccessResponse }>; // logging operations /** * Update the bucket logging settings. Log file will create every one hour and name format: -YYYY-mm-DD-HH-MM-SS-UniqueString. - * @param {string} name - bucket name - * @param {string} prefix - prefix path name to store the log files - * @param {RequestOptions} options - * @return {Promise} */ - putBucketLogging(name: string, prefix?: string, options?: RequestOptions): Promise + putBucketLogging(name: string, prefix?: string, options?: RequestOptions): Promise; /** * Get the bucket logging settings. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise<{ enable: boolean, prefix: string | null, res: NormalSuccessResponse }>} */ - getBucketLogging(name: string, options?: RequestOptions): Promise<{ enable: boolean, prefix: string | null, res: NormalSuccessResponse }> + getBucketLogging(name: string, options?: RequestOptions): Promise<{ enable: boolean, prefix: string | null, res: NormalSuccessResponse }>; /** * Delete the bucket logging settings. - * @param {string} name - bucket name - * @param {RequestOptions} options - * @return {Promise} */ - deleteBucketLogging(name: string, options?: RequestOptions): Promise + deleteBucketLogging(name: string, options?: RequestOptions): Promise; // Website operations /** * Set the bucket as a static website. - * @param {string} name - bucket name - * @param {PutBucketWebsiteConfig} config - * @return {Promise} */ - putBucketWebsite(name: string, config: PutBucketWebsiteConfig): Promise + putBucketWebsite(name: string, config: PutBucketWebsiteConfig): Promise; /** * Get the bucket website config. - * @param {string} name - bucket name - * @param {RequestOptions} options - * @return {Promise<{ index: string, error: string, res: NormalSuccessResponse }>} */ - getBucketWebsite(name: string, options?: RequestOptions): Promise<{ index: string, error: string, res: NormalSuccessResponse }> + getBucketWebsite(name: string, options?: RequestOptions): Promise<{ index: string, error: string, res: NormalSuccessResponse }>; /** * Delete the bucket website config. - * @param {string} name - bucket name - * @param {RequestOptions} options - * @return {Promise} */ - deleteBucketWebsite(name: string, options?: RequestOptions): Promise + deleteBucketWebsite(name: string, options?: RequestOptions): Promise; // referer operations /** * Set the bucket request Referer white list. - * @param {string} name - * @param {boolean} allowEmpty - allow empty request referer or not - * @param {Array} referers - Referer white list, e.g.: ['https://npm.taobao.org', 'http://cnpmjs.org'] - * @param {RequestOptions} options - * @return {Promise} */ - putBucketReferer(name: string, allowEmpty: boolean, referers: Array, options?: RequestOptions): Promise + putBucketReferer(name: string, allowEmpty: boolean, referers: string[], options?: RequestOptions): Promise; /** * Get the bucket request Referer white list. - * @param {string} name - bucket name - * @param {RequestOptions} options - * @return {Promise<{ allowEmpty: boolean, referers: Array, res: NormalSuccessResponse }>} */ - getBucketReferer(name: string, options?: RequestOptions): Promise<{ allowEmpty: boolean, referers: Array, res: NormalSuccessResponse }> + getBucketReferer(name: string, options?: RequestOptions): Promise<{ allowEmpty: boolean, referers: string[], res: NormalSuccessResponse }>; /** * Delete the bucket request Referer white list. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise} */ - deleteBucketReferer(name: string, options?: RequestOptions): Promise + deleteBucketReferer(name: string, options?: RequestOptions): Promise; // lifecycle operations /** * Set the bucket object lifecycle. - * @param {string} name - * @param {Array} rules - rule config list - * @param {RequestOptions} options - * @return {Promise} */ - putBucketLifecycle(name: string, rules: Array, options?: RequestOptions): Promise + putBucketLifecycle(name: string, rules: LifecycleRule[], options?: RequestOptions): Promise; /** * Get the bucket object lifecycle. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise<{ rules: Array, res: NormalSuccessResponse }>} */ - getBucketLifecycle(name: string, options?: RequestOptions): Promise<{ rules: Array, res: NormalSuccessResponse }> + getBucketLifecycle(name: string, options?: RequestOptions): Promise<{ rules: LifecycleRule[], res: NormalSuccessResponse }>; /** * Delete the bucket object lifecycle. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise} */ - deleteBucketLifecycle(name: string, options?: RequestOptions): Promise + deleteBucketLifecycle(name: string, options?: RequestOptions): Promise; // CORS operations /** * Set CORS rules of the bucket object - * @param {string} name - * @param {Array} rules - * @param {RequestOptions} options - * @return {Promise} */ - putBucketCORS(name: string, rules: Array, options?: RequestOptions): Promise + putBucketCORS(name: string, rules: CORSRule[], options?: RequestOptions): Promise; /** * Get CORS rules of the bucket object. - * @param {string} name - * @return {Promise<{rules: Array; res: NormalSuccessResponse}>} */ - getBucketCORS(name: string): Promise<{ rules: Array, res: NormalSuccessResponse }> + getBucketCORS(name: string): Promise<{ rules: CORSRule[], res: NormalSuccessResponse }>; /** * Delete CORS rules of the bucket object. - * @param {string} name - * @return {Promise} */ - deleteBucketCORS(name: string): Promise + deleteBucketCORS(name: string): Promise; /********************************************************** Object operations ********************************************/ /** * List objects in the bucket. - * @param {ListObjectsQuery | null} query - * @param {RequestOptions} options - * @return {Promise} */ - list(query: ListObjectsQuery | null, options: RequestOptions): Promise + list(query: ListObjectsQuery | null, options: RequestOptions): Promise; /** * Add an object to the bucket. - * @param {string} name - object name store on OSS - * @param file - {String|Buffer|ReadStream|File(only support Browser)|Blob(only support Browser)} object local path, content buffer or ReadStream content instance use in Node, Blob and html5 File - * @param {PutObjectOptions} options - optional parameters - * @return {Promise} */ - put(name: string, file: any, options?: PutObjectOptions): Promise + put(name: string, file: any, options?: PutObjectOptions): Promise; /** * Add a stream object to the bucket. - * @param {string} name - object name store on OSS - * @param stream - object ReadStream content instance - * @param {PutStreamOptions} options - optional parameters - * @return {Promise<{name: string; res: NormalSuccessResponse}>} */ - putStream(name: string, stream: any, options?: PutStreamOptions): Promise<{ name: string, res: NormalSuccessResponse }> + putStream(name: string, stream: any, options?: PutStreamOptions): Promise<{ name: string, res: NormalSuccessResponse }>; /** * Append an object to the bucket, it's almost same as put, but it can add content to existing object rather than override it. - * @param {string} name - * @param file - * @param {AppendObjectOptions} options - * @return {Promise} */ - append(name: string, file: any, options?: AppendObjectOptions): Promise + append(name: string, file: any, options?: AppendObjectOptions): Promise; /** * Get the Object url. If provide baseUrl, will use baseUrl instead the default endpoint. - * @param {string} name - * @param {string} baseUrl - * @return {string} */ - getObjectUrl(name: string, baseUrl?: string): string + getObjectUrl(name: string, baseUrl?: string): string; /** * Get the Object url. If provide baseUrl, will use baseUrl instead the default bucket and endpoint. Suggest use generateObjectUrl instead of getObjectUrl. - * @param {string} name - * @param {string} baseUrl - * @return {string} */ - generateObjectUrl(name: string, baseUrl?: string): string + generateObjectUrl(name: string, baseUrl?: string): string; /** * Head an object and get the meta info. - * @param {string} name - * @param {HeadObjectOptions} options - * @return {Promise} */ - head(name: string, options?: HeadObjectOptions): Promise + head(name: string, options?: HeadObjectOptions): Promise; /** * Get an object from the bucket. - * @param {string} name - * @param file - {String|WriteStream} file path or WriteStream instance to store the content If file is null or ignore this parameter, function will return info contains content property. - * @param {GetObjectOptions} options - * @return {Promise} */ - get(name: string, file?: any, options?: GetObjectOptions): Promise + get(name: string, file?: any, options?: GetObjectOptions): Promise; /** * Get an object read stream. - * @param {string} name - * @param {GetStreamOptions} options - * @return {Promise} */ - getStream(name?: string, options?: GetStreamOptions): Promise + getStream(name?: string, options?: GetStreamOptions): Promise; /** * Delete an object from the bucket. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise} */ - delete(name: string, options?: RequestOptions): Promise + delete(name: string, options?: RequestOptions): Promise; /** * Copy an object from sourceName to name. - * @param {string} name - object name store on OSS - * @param {string} sourceName - source object name If sourceName start with /, meaning it's a full name contains the bucket name. e.g.: /otherbucket/logo.png meaning copy otherbucket logn.png object to current bucket. - * @param {CopyObjectOptions} options - * @return {Promise} */ - copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise + copy(name: string, sourceName: string, options?: CopyObjectOptions): Promise; /** * Set an exists object meta. - * @param {string} name - * @param {UserMeta} meta - * @param {RequestOptions} options - * @return {Promise} */ - putMeta(name: string, meta: UserMeta, options: RequestOptions): Promise + putMeta(name: string, meta: UserMeta, options: RequestOptions): Promise; /** * Delete multi objects in one request. - * @param {Array} names - object names, max 1000 objects in once. - * @param {DeleteMultiOptions} options - * @return {Promise} */ - deleteMulti(names: Array, options?: DeleteMultiOptions): Promise + deleteMulti(names: string[], options?: DeleteMultiOptions): Promise; /** * Create a signature url for download or upload object. When you put object with signatureUrl ,you need to pass Content-Type.Please look at the example. - * @param {string} name - * @param {SignatureUrlOptions} options - * @return {string} */ - signatureUrl(name: string, options?: SignatureUrlOptions): string + signatureUrl(name: string, options?: SignatureUrlOptions): string; /** * Set object's ACL. - * @param {string} name - * @param {ACLType} acl - * @param {RequestOptions} options - * @return {Promise} */ - putACL(name: string, acl: ACLType, options?: RequestOptions): Promise + putACL(name: string, acl: ACLType, options?: RequestOptions): Promise; /** * Get object's ACL. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise} */ - getACL(name: string, options?: RequestOptions): Promise + getACL(name: string, options?: RequestOptions): Promise; /** * Restore Object. - * @param {string} name - * @param {RequestOptions} options - * @return {Promise} */ - restore(name: string, options?: RequestOptions): Promise + restore(name: string, options?: RequestOptions): Promise; /** - * - * @param {string} name - * @param {InitMultipartUploadOptions} options - * @return {Promise} + * multi upload */ - initMultipartUpload(name: string, options?: InitMultipartUploadOptions): Promise + initMultipartUpload(name: string, options?: InitMultipartUploadOptions): Promise; /** * After initiating a Multipart Upload event, you can upload data in parts based on the specified object name and Upload ID. - * @param {string} name - object name - * @param {string} uploadId - get by initMultipartUpload api - * @param {number} partNo - range is 1-10000, If this range is exceeded, OSS returns the InvalidArgument's error code. - * @param file - is File or FileName, the whole file - Multipart Upload requires that the size of any Part other than the last Part is greater than 100KB. - In Node you can use File or FileName, but in browser you only can use File. - * @param {number} start - part start bytes e.g: 102400 - * @param {number} end - part end bytes e.g: 204800 - * @param {RequestOptions} options - * @return {Promise} */ - uploadPart(name: string, uploadId: string, partNo: number, file: any, start: number, end: number, options?: RequestOptions): Promise + uploadPart(name: string, uploadId: string, partNo: number, file: any, start: number, end: number, options?: RequestOptions): Promise; /** - * Using Upload Part Copy, you can copy data from an existing object and upload a part of the data. When copying a file larger than 1 GB, you must use the Upload Part Copy method. If you want to copy a file smaller than 1 GB, see Copy Object. - * @param {string} name - * @param {string} uploadId - * @param {number} partNo - * @param {string} range - * @param {{sourceKey: string; sourceBucketName: string}} sourceData - * @param {{timeout?: number; headers?: object}} options - * @return {Promise} + * Using Upload Part Copy, you can copy data from an existing object and upload a part of the data. + * When copying a file larger than 1 GB, you must use the Upload Part Copy method. If you want to copy a file smaller than 1 GB, see Copy Object. */ - uploadPartCopy(name: string, uploadId: string, partNo: number, range: string, sourceData: { sourceKey: string, sourceBucketName: string }, options: { timeout?: number, headers?: object }): Promise + uploadPartCopy( + name: string, + uploadId: string, + partNo: number, + range: string, + sourceData: { sourceKey: string, sourceBucketName: string }, + options: { timeout?: number, headers?: object } + ): Promise; /** * After uploading all data parts, you must call the Complete Multipart Upload API to complete Multipart Upload for the entire file. - * @param {string} name - * @param {string} uploadId - * @param {Array<{number: number; etag: string}>} parts - * @param {CompleteMultipartUploadOptions} options - * @return {Promise} */ - completeMultipartUpload(name: string, uploadId: string, parts: Array<{ number: number, etag: string }>, options?: CompleteMultipartUploadOptions): Promise + completeMultipartUpload( + name: string, + uploadId: string, + parts: Array<{ number: number, etag: string }>, + options?: CompleteMultipartUploadOptions + ): Promise; /** * Upload file with OSS multipart. - * this function contains initMultipartUpload, uploadPart, completeMultipartUpload. When you use multipartUpload api,if you encounter problems with ConnectionTimeoutError, you should handle ConnectionTimeoutError in your business code. - * How to resolve ConnectionTimeoutError, you can decrease partSize size 、 Increase timeout 、Retry request , or give tips in your business code; - * @param {string} name - * @param file - * @param {MultipartUploadOptions} options - * @return {Promise} */ - multipartUpload(name: string, file: any, options: MultipartUploadOptions): Promise + multipartUpload(name: string, file: any, options: MultipartUploadOptions): Promise; /** * Copy file with OSS multipart. * this function contains head, initMultipartUpload, uploadPartCopy, completeMultipartUpload. * When copying a file larger than 1 GB, you should use the Upload Part Copy method. If you want to copy a file smaller than 1 GB, see Copy Object. - * @param {string} name - * @param {MultipartUploadCopySourceData} sourceData - * @param {MultipartUploadOptions} options - * @return {Promise} */ - multipartUploadCopy(name: string, sourceData: MultipartUploadCopySourceData, options?: MultipartUploadOptions): Promise + multipartUploadCopy(name: string, sourceData: MultipartUploadCopySourceData, options?: MultipartUploadOptions): Promise; /** * The ListParts command can be used to list all successfully uploaded parts mapped to a specific upload ID, i.e.: those not completed and not aborted. - * @param {string} name - * @param {string} uploadId - * @param {ListPartsQuery} query - * @param {RequestOptions} options - * @return {Promise} */ - listParts(name: string, uploadId: string, query?: ListPartsQuery, options?: RequestOptions): Promise + listParts(name: string, uploadId: string, query?: ListPartsQuery, options?: RequestOptions): Promise; /** * List on-going multipart uploads, i.e.: those not completed and not aborted. - * @param {ListUploadsQuery} query - * @param {RequestOptions} options - * @return {Promise} */ - listUploads(query: ListUploadsQuery, options?: RequestOptions): Promise + listUploads(query: ListUploadsQuery, options?: RequestOptions): Promise; /** * Abort a multipart upload for object. - * @param {string} name - * @param {string} uploadId - * @param {RequestOptions} options - * @return {Promise} */ - abortMultipartUpload(name: string, uploadId: string, options?: RequestOptions): Promise + abortMultipartUpload(name: string, uploadId: string, options?: RequestOptions): Promise; /************************************************ RTMP Operations *************************************************************/ /** * Create a live channel. - * @param {string} id - * @param {PutChannelConf} conf - * @param {RequestOptions} options - * @return {Promise} */ - putChannel(id: string, conf: PutChannelConf, options?: RequestOptions): Promise + putChannel(id: string, conf: PutChannelConf, options?: RequestOptions): Promise; /** * Get live channel info. - * @param {string} id - * @param {RequestOptions} options - * @return {Promise<{data: PutChannelConf; res: NormalSuccessResponse}>} */ - getChannel(id: string, options?: RequestOptions): Promise<{ data: PutChannelConf, res: NormalSuccessResponse }> + getChannel(id: string, options?: RequestOptions): Promise<{ data: PutChannelConf, res: NormalSuccessResponse }>; /** * Delete a live channel. - * @param {string} id - * @param {RequestOptions} options - * @return {Promise} */ - deleteChannel(id: string, options?: RequestOptions): Promise + deleteChannel(id: string, options?: RequestOptions): Promise; /** * Change the live channel status. - * @param {string} id - * @param {string} status - * @param {RequestOptions} options - * @return {Promise} */ - putChannelStatus(id: string, status?: string, options?: RequestOptions): Promise + putChannelStatus(id: string, status?: string, options?: RequestOptions): Promise; /** * Get the live channel status. - * @param {string} id - * @param {RequestOptions} options - * @return {Promise} */ - getChannelStatus(id: string, options?: RequestOptions): Promise + getChannelStatus(id: string, options?: RequestOptions): Promise; /** * List channels. - * @param {ListChannelsQuery} query - * @param {RequestOptions} options - * @return {Promise} */ - listChannels(query: ListChannelsQuery, options?: RequestOptions): Promise + listChannels(query: ListChannelsQuery, options?: RequestOptions): Promise; /** * Get the live channel history. - * @param {string} id - * @param {RequestOptions} options - * @return {Promise} */ - getChannelHistory(id: string, options?: RequestOptions): Promise + getChannelHistory(id: string, options?: RequestOptions): Promise; /** * Create a VOD playlist for the channel. - * @param {string} id - * @param {string} name - * @param {{startTime: number; endTime: number}} time - * @param {RequestOptions} options - * @return {Promise} */ - createVod(id: string, name: string, time: { startTime: number, endTime: number }, options?: RequestOptions): Promise + createVod(id: string, name: string, time: { startTime: number, endTime: number }, options?: RequestOptions): Promise; /** * Get signatured rtmp url for publishing. - * @param {string} channelId - * @param {GetRtmpUrlOptions} options - * @return {string} */ - getRtmpUrl(channelId?: string, options?: GetRtmpUrlOptions): string - + getRtmpUrl(channelId?: string, options?: GetRtmpUrlOptions): string; } diff --git a/types/ali-oss/tsconfig.json b/types/ali-oss/tsconfig.json index b6f46ae8e8..62f030a4fd 100644 --- a/types/ali-oss/tsconfig.json +++ b/types/ali-oss/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ diff --git a/types/ali-oss/tslint.json b/types/ali-oss/tslint.json index a41bf5d19a..f93cf8562a 100644 --- a/types/ali-oss/tslint.json +++ b/types/ali-oss/tslint.json @@ -1,79 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } From e32ea94e933c8d7d426ef4ad9734fe4a2e8bdbdf Mon Sep 17 00:00:00 2001 From: quas94 Date: Fri, 28 Sep 2018 17:53:41 +1000 Subject: [PATCH 0010/1121] Add definitions for Dropbox Chooser --- .../dropbox-chooser/dropbox-chooser-tests.ts | 20 ++++++ types/dropbox-chooser/index.d.ts | 66 +++++++++++++++++++ types/dropbox-chooser/tsconfig.json | 24 +++++++ types/dropbox-chooser/tslint.json | 1 + 4 files changed, 111 insertions(+) create mode 100644 types/dropbox-chooser/dropbox-chooser-tests.ts create mode 100644 types/dropbox-chooser/index.d.ts create mode 100644 types/dropbox-chooser/tsconfig.json create mode 100644 types/dropbox-chooser/tslint.json diff --git a/types/dropbox-chooser/dropbox-chooser-tests.ts b/types/dropbox-chooser/dropbox-chooser-tests.ts new file mode 100644 index 0000000000..f0930733f8 --- /dev/null +++ b/types/dropbox-chooser/dropbox-chooser-tests.ts @@ -0,0 +1,20 @@ +// Tests for Dropbox Chooser DefinitelyTyped TS definitions + +const options: DropboxChooserOptions = { + success: (files: ReadonlyArray) => { + console.log('Success, selected files were:', files); + }, +}; + +const Dropbox = window.Dropbox!; +Dropbox.choose(options); + +const sampleFile: DropboxChooserFile = { + id: 'SAMPLE_ID', + name: 'HelloBox.jpg', + link: 'http://localhost/1.png', + bytes: 1024, + icon: 'http://localhost/icons/png.png', + thumbnailLink: 'http://localhost/thumbnails/1.png', + isDir: false, +}; diff --git a/types/dropbox-chooser/index.d.ts b/types/dropbox-chooser/index.d.ts new file mode 100644 index 0000000000..8c9db6f72d --- /dev/null +++ b/types/dropbox-chooser/index.d.ts @@ -0,0 +1,66 @@ +// Type definitions for Dropbox Chooser 1.0 +// Project: https://www.dropbox.com/developers/chooser +// Definitions by: Michael Su +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Dropbox { + interface DropboxChooser { + choose(options: ChooserOptions): void; + } + + interface ChooserOptions { + // alled when a user selects an item in the Chooser + success(files: ReadonlyArray): void; + + // called when the user closes the dialog without selecting a file + cancel?(): void; + + // default: 'preview' + linkType?: 'preview' | 'direct'; + + // default: false + multiselect?: boolean; + + // eg. '.png' + extensions?: string[]; + + // default: false + folderselect?: boolean; + + // any positive number + sizeLimit?: number; + } + + interface File { + // Unique ID for the file, compatible with Dropbox API v2. + id: string; + + // Name of the file. + name: string; + + // URL to access the file, which varies depending on the linkType specified when the + // Chooser was triggered. + link: string; + + // Size of the file in bytes. + bytes: number; + + // URL to a 64x64px icon for the file based on the file's extension. + icon: string; + + // A thumbnail URL generated when the user selects images and videos. + // If the user didn't select an image or video, no thumbnail will be included. + thumbnailLink?: string; + + // whether or not the file is actually a directory + isDir: boolean; + } +} + +type DropboxChooser = Dropbox.DropboxChooser; +type DropboxChooserOptions = Dropbox.ChooserOptions; +type DropboxChooserFile = Dropbox.File; + +interface Window { + Dropbox?: DropboxChooser; +} diff --git a/types/dropbox-chooser/tsconfig.json b/types/dropbox-chooser/tsconfig.json new file mode 100644 index 0000000000..88fb15cc91 --- /dev/null +++ b/types/dropbox-chooser/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "dropbox-chooser-tests.ts" + ] +} diff --git a/types/dropbox-chooser/tslint.json b/types/dropbox-chooser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/dropbox-chooser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1da2bd0daf5e8d9d4d83b393a12475d86e3cbf69 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Wed, 10 Oct 2018 20:07:13 +0100 Subject: [PATCH 0011/1121] Initial commit --- types/d3-graphviz/d3-graphviz-tests.ts | 0 types/d3-graphviz/index.d.ts | 39 ++++++++++++++++++++++++++ types/d3-graphviz/tsconfig.json | 22 +++++++++++++++ types/d3-graphviz/tslint.json | 1 + 4 files changed, 62 insertions(+) create mode 100644 types/d3-graphviz/d3-graphviz-tests.ts create mode 100644 types/d3-graphviz/index.d.ts create mode 100644 types/d3-graphviz/tsconfig.json create mode 100644 types/d3-graphviz/tslint.json diff --git a/types/d3-graphviz/d3-graphviz-tests.ts b/types/d3-graphviz/d3-graphviz-tests.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts new file mode 100644 index 0000000000..8dc81e1f1c --- /dev/null +++ b/types/d3-graphviz/index.d.ts @@ -0,0 +1,39 @@ +// Type definitions for d3-graphviz 2.6 +// Project: https://github.com/magjac/d3-graphviz +// Definitions by: Dom Parfitt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/*~ If this module is a UMD module that exposes a global variable 'myLib' when + *~ loaded outside a module loader environment, declare that global here. + *~ Otherwise, delete this declaration. + */ +export as namespace myLib; + +/*~ If this module has methods, declare them as functions like so. + */ +export function myMethod(a: string): string; +export function myOtherMethod(a: number): number; + +/*~ You can declare types that are available via importing the module */ +export interface someType { + name: string; + length: number; + extras?: string[]; +} + +/*~ You can declare properties of the module using const, let, or var */ +export const myField: number; + +/*~ If there are types, properties, or methods inside dotted names + *~ of the module, declare them inside a 'namespace'. + */ +export namespace subProp { + /*~ For example, given this definition, someone could write: + *~ import { subProp } from 'yourModule'; + *~ subProp.foo(); + *~ or + *~ import * as yourMod from 'yourModule'; + *~ yourMod.subProp.foo(); + */ + export function foo(): void; +} \ No newline at end of file diff --git a/types/d3-graphviz/tsconfig.json b/types/d3-graphviz/tsconfig.json new file mode 100644 index 0000000000..42e41a7b1f --- /dev/null +++ b/types/d3-graphviz/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "d3-graphviz-tests.ts" + ] +} diff --git a/types/d3-graphviz/tslint.json b/types/d3-graphviz/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/d3-graphviz/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From b9679651519dcd925a489548d30a0c8e4f7144f2 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Thu, 11 Oct 2018 21:22:31 +0100 Subject: [PATCH 0012/1121] Began defining functions --- types/d3-graphviz/index.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 8dc81e1f1c..7adf792638 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -3,6 +3,24 @@ // Definitions by: Dom Parfitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +export function extractElementData(element: any): any; +export function extractAllElementsData(element: any): any; +export function createElement(data: any): any; +export function createElementWithAttributes(data: any): any; +export function replaceElement(element: any, data: any): any; +export function insertElementData(element: any, datum: any): void; +export function insertAllElementsData(element: any, datum: any): void; +export function insertChildren(element: any, index: any): void; +export function attributeElement(data: any): void; +export function shallowCopyObject(obj: any): any; +export function roundTo4Decimals(x: number): number; +// var zoom$1 = function (enable) +export function createZoomBehavior(): any; +export function getTranslatedZoomTransform(selection$$1: any): any; +export function translateZoomBehaviorTransform(selection$$1: any): any; + +// ======================================================================== + /*~ If this module is a UMD module that exposes a global variable 'myLib' when *~ loaded outside a module loader environment, declare that global here. *~ Otherwise, delete this declaration. From 0f692416dca28aaa4f9f04203853735c7e9d8734 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 11:17:01 +0100 Subject: [PATCH 0013/1121] Added top level exported function, options interface and Graphviz object interface --- types/d3-graphviz/index.d.ts | 103 +++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 46 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 7adf792638..e1e7bd0cd9 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -3,55 +3,66 @@ // Definitions by: Dom Parfitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function extractElementData(element: any): any; -export function extractAllElementsData(element: any): any; -export function createElement(data: any): any; -export function createElementWithAttributes(data: any): any; -export function replaceElement(element: any, data: any): any; -export function insertElementData(element: any, datum: any): void; -export function insertAllElementsData(element: any, datum: any): void; -export function insertChildren(element: any, index: any): void; -export function attributeElement(data: any): void; -export function shallowCopyObject(obj: any): any; -export function roundTo4Decimals(x: number): number; -// var zoom$1 = function (enable) -export function createZoomBehavior(): any; -export function getTranslatedZoomTransform(selection$$1: any): any; -export function translateZoomBehaviorTransform(selection$$1: any): any; - -// ======================================================================== - -/*~ If this module is a UMD module that exposes a global variable 'myLib' when - *~ loaded outside a module loader environment, declare that global here. - *~ Otherwise, delete this declaration. +/** + * + * @param selector + * @param options */ -export as namespace myLib; +export function graphviz(selector: string, options: IGraphvizOptions | boolean): IGraphviz; -/*~ If this module has methods, declare them as functions like so. - */ -export function myMethod(a: string): string; -export function myOtherMethod(a: number): number; - -/*~ You can declare types that are available via importing the module */ -export interface someType { - name: string; - length: number; - extras?: string[]; +export interface IGraphvizOptions { + useWorker?: boolean, + engine?: string, + totalMemory?: number, + keyMode?: string, + fade?: boolean, + tweenPaths?: boolean, + tweenShapes?: boolean, + convertEqualSidedPolygons?: boolean, + tweenPrecision?: number, + growEnteringEdges?: boolean, + zoom?: boolean, + zoomScaleExtent?: number[], + zoomTranslateExtent?: number[][], + width?: number, + height?: number, + scale?: number, + fit?: boolean, } -/*~ You can declare properties of the module using const, let, or var */ -export const myField: number; +export interface IGraphviz { + engine(engine: string): IGraphviz; + addImage(path: any, width: any, height: any): any; + totalMemory(size: number): IGraphviz; + keyMode(keyMode: any): any; + fade(enable: boolean): IGraphviz; + tweenPaths(enable: boolean): IGraphviz; + tweenShapes(enable: boolean): IGraphviz; + convertEqualSidedPolygons(enable: boolean): IGraphviz; + tweenPrecision(precision: number): IGraphviz; + growEnteringEdges(enable: boolean): IGraphviz; + zoom(enable: boolean): IGraphviz; + resetZoom(transition: any): any; + zoomBehavior(): any; + zoomSelection(): any; + zoomScaleExtent(extent: number[]): IGraphviz; + zoomTranslateExtent(extent: number[][]): IGraphviz; + render(callback: any): IGraphviz; + dot: any; + data(): any; + renderDot(src: string, callback: any): any; + transition: any; + active(name: any): any; + options(options: IGraphvizOptions | undefined): IGraphviz; + width(width: number): IGraphviz; + height(height: number): IGraphviz; + scale(scale: number): IGraphviz; + fit(fit: boolean): IGraphviz; + attributer: any; + on(typenames: string, callback: () => void): any; + onerror: any; + logEvents(enable: boolean): IGraphviz; + drawEdge: any; + updateDrawnEdge(x1: any, x2: any, y1: any, y2: any, attributes?: any, options?: any): any; -/*~ If there are types, properties, or methods inside dotted names - *~ of the module, declare them inside a 'namespace'. - */ -export namespace subProp { - /*~ For example, given this definition, someone could write: - *~ import { subProp } from 'yourModule'; - *~ subProp.foo(); - *~ or - *~ import * as yourMod from 'yourModule'; - *~ yourMod.subProp.foo(); - */ - export function foo(): void; } \ No newline at end of file From b64b97aaa692ebc73c6619386825b34096822e5b Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 11:59:11 +0100 Subject: [PATCH 0014/1121] Added more definitions --- types/d3-graphviz/index.d.ts | 45 ++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index e1e7bd0cd9..7fdd4b2244 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -1,8 +1,11 @@ +import { IEdgeOptions, IGraphviz, INodeOptions } from './index.d'; // Type definitions for d3-graphviz 2.6 // Project: https://github.com/magjac/d3-graphviz // Definitions by: Dom Parfitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import { ZoomBehavior } from 'd3-zoom' + /** * * @param selector @@ -30,9 +33,28 @@ export interface IGraphvizOptions { fit?: boolean, } +export interface IEdgeAttributes { + style: any; + URL: any; + tooltip: any; +} + +export interface IEdgeOptions { + shortening: number; +} + +export interface INodeAttributes { + URL: any; + tooltip: any; +} + +export interface INodeOptions { + +} + export interface IGraphviz { engine(engine: string): IGraphviz; - addImage(path: any, width: any, height: any): any; + addImage(path: string, width: number, height: number): IGraphviz; totalMemory(size: number): IGraphviz; keyMode(keyMode: any): any; fade(enable: boolean): IGraphviz; @@ -43,11 +65,11 @@ export interface IGraphviz { growEnteringEdges(enable: boolean): IGraphviz; zoom(enable: boolean): IGraphviz; resetZoom(transition: any): any; - zoomBehavior(): any; - zoomSelection(): any; + zoomBehavior(): ZoomBehavior | null; + zoomSelection(): any | null; zoomScaleExtent(extent: number[]): IGraphviz; zoomTranslateExtent(extent: number[][]): IGraphviz; - render(callback: any): IGraphviz; + render(callback: Function): IGraphviz; dot: any; data(): any; renderDot(src: string, callback: any): any; @@ -62,7 +84,16 @@ export interface IGraphviz { on(typenames: string, callback: () => void): any; onerror: any; logEvents(enable: boolean): IGraphviz; - drawEdge: any; - updateDrawnEdge(x1: any, x2: any, y1: any, y2: any, attributes?: any, options?: any): any; - + drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; + updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; + moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; + insertDrawnEdge: any; + removeDrawnEdge: any; + drawnEdgeSelection(): any; + drawNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; + moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; + inserDrawnNode: any; + removeDrawnNode: any; + drawnNodeSelection(): any; } \ No newline at end of file From 8d088a3d2ed1d8730d7db8d22a465fbbb8a955b3 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 13:01:59 +0100 Subject: [PATCH 0015/1121] Added dom lib --- types/d3-graphviz/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/d3-graphviz/tsconfig.json b/types/d3-graphviz/tsconfig.json index 42e41a7b1f..e33601771b 100644 --- a/types/d3-graphviz/tsconfig.json +++ b/types/d3-graphviz/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "module": "commonjs", "lib": [ - "es6" + "es6", + "dom" ], "noImplicitAny": true, "noImplicitThis": true, From a07b85a68ffbc759abb2e45f880dc4d3ee107d72 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 13:02:14 +0100 Subject: [PATCH 0016/1121] Added more definitions --- types/d3-graphviz/index.d.ts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 7fdd4b2244..d29861a500 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -1,10 +1,11 @@ -import { IEdgeOptions, IGraphviz, INodeOptions } from './index.d'; // Type definitions for d3-graphviz 2.6 // Project: https://github.com/magjac/d3-graphviz // Definitions by: Dom Parfitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { ZoomBehavior } from 'd3-zoom' +import { Selection } from 'd3-selection' + /** * @@ -56,7 +57,7 @@ export interface IGraphviz { engine(engine: string): IGraphviz; addImage(path: string, width: number, height: number): IGraphviz; totalMemory(size: number): IGraphviz; - keyMode(keyMode: any): any; + keyMode(keyMode: string): IGraphviz; fade(enable: boolean): IGraphviz; tweenPaths(enable: boolean): IGraphviz; tweenShapes(enable: boolean): IGraphviz; @@ -70,9 +71,9 @@ export interface IGraphviz { zoomScaleExtent(extent: number[]): IGraphviz; zoomTranslateExtent(extent: number[][]): IGraphviz; render(callback: Function): IGraphviz; - dot: any; + dot(src: any, callback: () => void): any; data(): any; - renderDot(src: string, callback: any): any; + renderDot(src: string, callback: any): IGraphviz; transition: any; active(name: any): any; options(options: IGraphvizOptions | undefined): IGraphviz; @@ -80,20 +81,20 @@ export interface IGraphviz { height(height: number): IGraphviz; scale(scale: number): IGraphviz; fit(fit: boolean): IGraphviz; - attributer: any; + attributer(callback: any): any; on(typenames: string, callback: () => void): any; - onerror: any; + onerror(callback: any): any; logEvents(enable: boolean): IGraphviz; drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; - insertDrawnEdge: any; - removeDrawnEdge: any; + insertDrawnEdge(name: string): IGraphviz; + removeDrawnEdge(): IGraphviz; drawnEdgeSelection(): any; drawNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; updateDrawnNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; - inserDrawnNode: any; - removeDrawnNode: any; - drawnNodeSelection(): any; + inserDrawnNode(nodeId: string): IGraphviz; + removeDrawnNode(): IGraphviz; + drawnNodeSelection(): Selection; } \ No newline at end of file From cbbc39e185d96d299b688378fd13a20446bb1418 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 13:04:34 +0100 Subject: [PATCH 0017/1121] Updated config --- types/d3-graphviz/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/d3-graphviz/tsconfig.json b/types/d3-graphviz/tsconfig.json index e33601771b..55afef6cff 100644 --- a/types/d3-graphviz/tsconfig.json +++ b/types/d3-graphviz/tsconfig.json @@ -8,6 +8,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../" From 55dc1a3e412643401220300035bf939315ab5bc3 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 13:06:33 +0100 Subject: [PATCH 0018/1121] Added required TS version --- types/d3-graphviz/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index d29861a500..9429cc7ae9 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/magjac/d3-graphviz // Definitions by: Dom Parfitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import { ZoomBehavior } from 'd3-zoom' import { Selection } from 'd3-selection' From 37a35d669c541355565c9191df34a18631fac4d3 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 13:59:08 +0100 Subject: [PATCH 0019/1121] Updated some parameters to be optional --- types/d3-graphviz/index.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 9429cc7ae9..52547bb101 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -7,13 +7,12 @@ import { ZoomBehavior } from 'd3-zoom' import { Selection } from 'd3-selection' - /** * * @param selector * @param options */ -export function graphviz(selector: string, options: IGraphvizOptions | boolean): IGraphviz; +export function graphviz(selector: string, options?: IGraphvizOptions | boolean): IGraphviz; export interface IGraphvizOptions { useWorker?: boolean, @@ -74,7 +73,7 @@ export interface IGraphviz { render(callback: Function): IGraphviz; dot(src: any, callback: () => void): any; data(): any; - renderDot(src: string, callback: any): IGraphviz; + renderDot(src: string, callback?: any): IGraphviz; transition: any; active(name: any): any; options(options: IGraphvizOptions | undefined): IGraphviz; From 7acb2d656f09f7e05d07364a7730a326ab0f8b9f Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 14:59:43 +0100 Subject: [PATCH 0020/1121] Updated definitions per API --- types/d3-graphviz/index.d.ts | 51 +++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 52547bb101..aab3955658 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -7,6 +7,13 @@ import { ZoomBehavior } from 'd3-zoom' import { Selection } from 'd3-selection' +//This should be extending d3-selection, need to check it is correct +export interface ISelection extends Selection { + graphviz(options?: IGraphvizOptions | boolean): IGraphviz; + selectWithoutDataPropagation(): ISelection; +} + + /** * * @param selector @@ -34,7 +41,7 @@ export interface IGraphvizOptions { fit?: boolean, } -export interface IEdgeAttributes { +export interface IDotAttributes { style: any; URL: any; tooltip: any; @@ -44,55 +51,51 @@ export interface IEdgeOptions { shortening: number; } -export interface INodeAttributes { - URL: any; - tooltip: any; -} - export interface INodeOptions { } export interface IGraphviz { - engine(engine: string): IGraphviz; - addImage(path: string, width: number, height: number): IGraphviz; + engine(engine: string): IGraphviz; //engine should be an enum + addImage(path: string, width: number, height: number): IGraphviz; //Width & height can be strings, i.e. '100px' totalMemory(size: number): IGraphviz; - keyMode(keyMode: string): IGraphviz; + keyMode(keyMode: string): IGraphviz; //keyMode should be an enum fade(enable: boolean): IGraphviz; tweenPaths(enable: boolean): IGraphviz; tweenShapes(enable: boolean): IGraphviz; convertEqualSidedPolygons(enable: boolean): IGraphviz; - tweenPrecision(precision: number): IGraphviz; + tweenPrecision(precision: number): IGraphviz; //precision can be a string, i.e. '50%' growEnteringEdges(enable: boolean): IGraphviz; zoom(enable: boolean): IGraphviz; - resetZoom(transition: any): any; + resetZoom(transition?: any): any; zoomBehavior(): ZoomBehavior | null; zoomSelection(): any | null; - zoomScaleExtent(extent: number[]): IGraphviz; - zoomTranslateExtent(extent: number[][]): IGraphviz; - render(callback: Function): IGraphviz; - dot(src: any, callback: () => void): any; + zoomScaleExtent(extent?: number[]): IGraphviz; + zoomTranslateExtent(extent?: number[][]): IGraphviz; + render(callback?: Function): IGraphviz; + dot(src: any, callback?: () => void): IGraphviz; data(): any; renderDot(src: string, callback?: any): IGraphviz; - transition: any; - active(name: any): any; - options(options: IGraphvizOptions | undefined): IGraphviz; + transition(name: any): IGraphviz; + active(name?: any): any; //Returns a transition, what type? + options(): IGraphvizOptions; + options(options: IGraphvizOptions): IGraphviz; width(width: number): IGraphviz; height(height: number): IGraphviz; scale(scale: number): IGraphviz; fit(fit: boolean): IGraphviz; - attributer(callback: any): any; - on(typenames: string, callback: () => void): any; + attributer(callback: Function | null): IGraphviz; + on(typenames: string, callback?: () => void): any; onerror(callback: any): any; logEvents(enable: boolean): IGraphviz; - drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; - updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IEdgeAttributes, options?: IEdgeOptions): IGraphviz; + drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; + updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; insertDrawnEdge(name: string): IGraphviz; removeDrawnEdge(): IGraphviz; drawnEdgeSelection(): any; - drawNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; - updateDrawnNode(x: number, y: number, nodeId: string, attributes?: INodeAttributes, options?: INodeOptions): IGraphviz; + drawNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; inserDrawnNode(nodeId: string): IGraphviz; removeDrawnNode(): IGraphviz; From bde0d4ee2b9aa89b7905652ccdf1fd5506409b54 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 15:49:18 +0100 Subject: [PATCH 0021/1121] Fixed selection extension methods --- types/d3-graphviz/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index aab3955658..cfcde911be 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -7,13 +7,13 @@ import { ZoomBehavior } from 'd3-zoom' import { Selection } from 'd3-selection' -//This should be extending d3-selection, need to check it is correct -export interface ISelection extends Selection { - graphviz(options?: IGraphvizOptions | boolean): IGraphviz; - selectWithoutDataPropagation(): ISelection; +declare module 'd3-selection' { + interface Selection { + graphviz(options?: IGraphvizOptions | boolean): IGraphviz; + selectWithoutDataPropagation(): Selection; + } } - /** * * @param selector From 89691438b48dd31c9bf7cccc50779bfdacb70d29 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 15:57:25 +0100 Subject: [PATCH 0022/1121] Added module declaration --- types/d3-graphviz/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index cfcde911be..f4904a8829 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -4,10 +4,12 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +declare module 'd3-graphviz' { + import { ZoomBehavior } from 'd3-zoom' import { Selection } from 'd3-selection' -declare module 'd3-selection' { +module 'd3-selection' { interface Selection { graphviz(options?: IGraphvizOptions | boolean): IGraphviz; selectWithoutDataPropagation(): Selection; @@ -100,4 +102,5 @@ export interface IGraphviz { inserDrawnNode(nodeId: string): IGraphviz; removeDrawnNode(): IGraphviz; drawnNodeSelection(): Selection; -} \ No newline at end of file +} +} From 3c70f6db28885d730a4ce4656d0ccf8306cb5625 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 15:58:58 +0100 Subject: [PATCH 0023/1121] Formatting --- types/d3-graphviz/index.d.ts | 190 +++++++++++++++++------------------ 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index f4904a8829..c8eb54c06a 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -6,101 +6,101 @@ declare module 'd3-graphviz' { -import { ZoomBehavior } from 'd3-zoom' -import { Selection } from 'd3-selection' + import { ZoomBehavior } from 'd3-zoom' + import { Selection } from 'd3-selection' -module 'd3-selection' { - interface Selection { - graphviz(options?: IGraphvizOptions | boolean): IGraphviz; - selectWithoutDataPropagation(): Selection; + module 'd3-selection' { + interface Selection { + graphviz(options?: IGraphvizOptions | boolean): IGraphviz; + selectWithoutDataPropagation(): Selection; + } + } + + /** + * + * @param selector + * @param options + */ + export function graphviz(selector: string, options?: IGraphvizOptions | boolean): IGraphviz; + + export interface IGraphvizOptions { + useWorker?: boolean, + engine?: string, + totalMemory?: number, + keyMode?: string, + fade?: boolean, + tweenPaths?: boolean, + tweenShapes?: boolean, + convertEqualSidedPolygons?: boolean, + tweenPrecision?: number, + growEnteringEdges?: boolean, + zoom?: boolean, + zoomScaleExtent?: number[], + zoomTranslateExtent?: number[][], + width?: number, + height?: number, + scale?: number, + fit?: boolean, + } + + export interface IDotAttributes { + style: any; + URL: any; + tooltip: any; + } + + export interface IEdgeOptions { + shortening: number; + } + + export interface INodeOptions { + + } + + export interface IGraphviz { + engine(engine: string): IGraphviz; //engine should be an enum + addImage(path: string, width: number, height: number): IGraphviz; //Width & height can be strings, i.e. '100px' + totalMemory(size: number): IGraphviz; + keyMode(keyMode: string): IGraphviz; //keyMode should be an enum + fade(enable: boolean): IGraphviz; + tweenPaths(enable: boolean): IGraphviz; + tweenShapes(enable: boolean): IGraphviz; + convertEqualSidedPolygons(enable: boolean): IGraphviz; + tweenPrecision(precision: number): IGraphviz; //precision can be a string, i.e. '50%' + growEnteringEdges(enable: boolean): IGraphviz; + zoom(enable: boolean): IGraphviz; + resetZoom(transition?: any): any; + zoomBehavior(): ZoomBehavior | null; + zoomSelection(): any | null; + zoomScaleExtent(extent?: number[]): IGraphviz; + zoomTranslateExtent(extent?: number[][]): IGraphviz; + render(callback?: Function): IGraphviz; + dot(src: any, callback?: () => void): IGraphviz; + data(): any; + renderDot(src: string, callback?: any): IGraphviz; + transition(name: any): IGraphviz; + active(name?: any): any; //Returns a transition, what type? + options(): IGraphvizOptions; + options(options: IGraphvizOptions): IGraphviz; + width(width: number): IGraphviz; + height(height: number): IGraphviz; + scale(scale: number): IGraphviz; + fit(fit: boolean): IGraphviz; + attributer(callback: Function | null): IGraphviz; + on(typenames: string, callback?: () => void): any; + onerror(callback: any): any; + logEvents(enable: boolean): IGraphviz; + drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; + updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; + moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; + insertDrawnEdge(name: string): IGraphviz; + removeDrawnEdge(): IGraphviz; + drawnEdgeSelection(): any; + drawNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; + moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; + inserDrawnNode(nodeId: string): IGraphviz; + removeDrawnNode(): IGraphviz; + drawnNodeSelection(): Selection; } } - -/** - * - * @param selector - * @param options - */ -export function graphviz(selector: string, options?: IGraphvizOptions | boolean): IGraphviz; - -export interface IGraphvizOptions { - useWorker?: boolean, - engine?: string, - totalMemory?: number, - keyMode?: string, - fade?: boolean, - tweenPaths?: boolean, - tweenShapes?: boolean, - convertEqualSidedPolygons?: boolean, - tweenPrecision?: number, - growEnteringEdges?: boolean, - zoom?: boolean, - zoomScaleExtent?: number[], - zoomTranslateExtent?: number[][], - width?: number, - height?: number, - scale?: number, - fit?: boolean, -} - -export interface IDotAttributes { - style: any; - URL: any; - tooltip: any; -} - -export interface IEdgeOptions { - shortening: number; -} - -export interface INodeOptions { - -} - -export interface IGraphviz { - engine(engine: string): IGraphviz; //engine should be an enum - addImage(path: string, width: number, height: number): IGraphviz; //Width & height can be strings, i.e. '100px' - totalMemory(size: number): IGraphviz; - keyMode(keyMode: string): IGraphviz; //keyMode should be an enum - fade(enable: boolean): IGraphviz; - tweenPaths(enable: boolean): IGraphviz; - tweenShapes(enable: boolean): IGraphviz; - convertEqualSidedPolygons(enable: boolean): IGraphviz; - tweenPrecision(precision: number): IGraphviz; //precision can be a string, i.e. '50%' - growEnteringEdges(enable: boolean): IGraphviz; - zoom(enable: boolean): IGraphviz; - resetZoom(transition?: any): any; - zoomBehavior(): ZoomBehavior | null; - zoomSelection(): any | null; - zoomScaleExtent(extent?: number[]): IGraphviz; - zoomTranslateExtent(extent?: number[][]): IGraphviz; - render(callback?: Function): IGraphviz; - dot(src: any, callback?: () => void): IGraphviz; - data(): any; - renderDot(src: string, callback?: any): IGraphviz; - transition(name: any): IGraphviz; - active(name?: any): any; //Returns a transition, what type? - options(): IGraphvizOptions; - options(options: IGraphvizOptions): IGraphviz; - width(width: number): IGraphviz; - height(height: number): IGraphviz; - scale(scale: number): IGraphviz; - fit(fit: boolean): IGraphviz; - attributer(callback: Function | null): IGraphviz; - on(typenames: string, callback?: () => void): any; - onerror(callback: any): any; - logEvents(enable: boolean): IGraphviz; - drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; - updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; - moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; - insertDrawnEdge(name: string): IGraphviz; - removeDrawnEdge(): IGraphviz; - drawnEdgeSelection(): any; - drawNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; - updateDrawnNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; - moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; - inserDrawnNode(nodeId: string): IGraphviz; - removeDrawnNode(): IGraphviz; - drawnNodeSelection(): Selection; -} -} From f5735f792e2167eaee6b7ef7ab7b45f71e0298d0 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 16:00:50 +0100 Subject: [PATCH 0024/1121] Updated names --- types/d3-graphviz/index.d.ts | 84 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index c8eb54c06a..9e4b62f104 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -11,7 +11,7 @@ declare module 'd3-graphviz' { module 'd3-selection' { interface Selection { - graphviz(options?: IGraphvizOptions | boolean): IGraphviz; + graphviz(options?: GraphvizOptions | boolean): Graphviz; selectWithoutDataPropagation(): Selection; } } @@ -21,9 +21,9 @@ declare module 'd3-graphviz' { * @param selector * @param options */ - export function graphviz(selector: string, options?: IGraphvizOptions | boolean): IGraphviz; + export function graphviz(selector: string, options?: GraphvizOptions | boolean): Graphviz; - export interface IGraphvizOptions { + export interface GraphvizOptions { useWorker?: boolean, engine?: string, totalMemory?: number, @@ -43,64 +43,64 @@ declare module 'd3-graphviz' { fit?: boolean, } - export interface IDotAttributes { + export interface DotAttributes { style: any; URL: any; tooltip: any; } - export interface IEdgeOptions { + export interface EdgeOptions { shortening: number; } - export interface INodeOptions { + export interface NodeOptions { } - export interface IGraphviz { - engine(engine: string): IGraphviz; //engine should be an enum - addImage(path: string, width: number, height: number): IGraphviz; //Width & height can be strings, i.e. '100px' - totalMemory(size: number): IGraphviz; - keyMode(keyMode: string): IGraphviz; //keyMode should be an enum - fade(enable: boolean): IGraphviz; - tweenPaths(enable: boolean): IGraphviz; - tweenShapes(enable: boolean): IGraphviz; - convertEqualSidedPolygons(enable: boolean): IGraphviz; - tweenPrecision(precision: number): IGraphviz; //precision can be a string, i.e. '50%' - growEnteringEdges(enable: boolean): IGraphviz; - zoom(enable: boolean): IGraphviz; + export interface Graphviz { + engine(engine: string): Graphviz; //engine should be an enum + addImage(path: string, width: number, height: number): Graphviz; //Width & height can be strings, i.e. '100px' + totalMemory(size: number): Graphviz; + keyMode(keyMode: string): Graphviz; //keyMode should be an enum + fade(enable: boolean): Graphviz; + tweenPaths(enable: boolean): Graphviz; + tweenShapes(enable: boolean): Graphviz; + convertEqualSidedPolygons(enable: boolean): Graphviz; + tweenPrecision(precision: number): Graphviz; //precision can be a string, i.e. '50%' + growEnteringEdges(enable: boolean): Graphviz; + zoom(enable: boolean): Graphviz; resetZoom(transition?: any): any; zoomBehavior(): ZoomBehavior | null; zoomSelection(): any | null; - zoomScaleExtent(extent?: number[]): IGraphviz; - zoomTranslateExtent(extent?: number[][]): IGraphviz; - render(callback?: Function): IGraphviz; - dot(src: any, callback?: () => void): IGraphviz; + zoomScaleExtent(extent?: number[]): Graphviz; + zoomTranslateExtent(extent?: number[][]): Graphviz; + render(callback?: Function): Graphviz; + dot(src: any, callback?: () => void): Graphviz; data(): any; - renderDot(src: string, callback?: any): IGraphviz; - transition(name: any): IGraphviz; + renderDot(src: string, callback?: any): Graphviz; + transition(name: any): Graphviz; active(name?: any): any; //Returns a transition, what type? - options(): IGraphvizOptions; - options(options: IGraphvizOptions): IGraphviz; - width(width: number): IGraphviz; - height(height: number): IGraphviz; - scale(scale: number): IGraphviz; - fit(fit: boolean): IGraphviz; - attributer(callback: Function | null): IGraphviz; + options(): GraphvizOptions; + options(options: GraphvizOptions): Graphviz; + width(width: number): Graphviz; + height(height: number): Graphviz; + scale(scale: number): Graphviz; + fit(fit: boolean): Graphviz; + attributer(callback: Function | null): Graphviz; on(typenames: string, callback?: () => void): any; onerror(callback: any): any; - logEvents(enable: boolean): IGraphviz; - drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; - updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: IDotAttributes, options?: IEdgeOptions): IGraphviz; - moveDrawnEdgeEndPoint(x2: number, y2: number, options?: IEdgeOptions): IGraphviz; - insertDrawnEdge(name: string): IGraphviz; - removeDrawnEdge(): IGraphviz; + logEvents(enable: boolean): Graphviz; + drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; + updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; + moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): Graphviz; + insertDrawnEdge(name: string): Graphviz; + removeDrawnEdge(): Graphviz; drawnEdgeSelection(): any; - drawNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; - updateDrawnNode(x: number, y: number, nodeId: string, attributes?: IDotAttributes, options?: INodeOptions): IGraphviz; - moveDrawnNode(x: number, y: number, options?: INodeOptions): IGraphviz; - inserDrawnNode(nodeId: string): IGraphviz; - removeDrawnNode(): IGraphviz; + drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; + moveDrawnNode(x: number, y: number, options?: NodeOptions): Graphviz; + inserDrawnNode(nodeId: string): Graphviz; + removeDrawnNode(): Graphviz; drawnNodeSelection(): Selection; } } From 52afe229919b363b5817b57ab17e85d37beece8c Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 16:12:21 +0100 Subject: [PATCH 0025/1121] Re-ordered to match the API with sections --- types/d3-graphviz/index.d.ts | 127 ++++++++++++++++++++++------------- 1 file changed, 80 insertions(+), 47 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 9e4b62f104..ebb97df2cb 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -23,6 +23,86 @@ declare module 'd3-graphviz' { */ export function graphviz(selector: string, options?: GraphvizOptions | boolean): Graphviz; + export interface Graphviz { + //Options + options(): GraphvizOptions; + options(options: GraphvizOptions): Graphviz; + + //Rendering + renderDot(src: string, callback?: any): Graphviz; + dot(src: any, callback?: () => void): Graphviz; + render(callback?: Function): Graphviz; + engine(engine: string): Graphviz; //engine should be an enum + onerror(callback: any): any; + + //Images + addImage(path: string, width: number, height: number): Graphviz; //Width & height can be strings, i.e. '100px' + + //Creating Transitions + transition(name: any): Graphviz; + active(name?: any): any; //Returns a transition, what type? + + //Controlling SVG and Graph Size + width(width: number): Graphviz; + height(height: number): Graphviz; + fit(fit: boolean): Graphviz; + scale(scale: number): Graphviz; + + //Control Flow + on(typenames: string, callback?: () => void): any; + logEvents(enable: boolean): Graphviz; + + //Controlling Fade + fade(enable: boolean): Graphviz; + + //Controlling Animated Growth of Entering Edges + growEnteringEdges(enable: boolean): Graphviz; + + //Controlling Path Tweening + tweenPaths(enable: boolean): Graphviz; + tweenPrecision(precision: number): Graphviz; //precision can be a string, i.e. '50%' + + //Controlling Shape Tweening + tweenShapes(enable: boolean): Graphviz; + convertEqualSidedPolygons(enable: boolean): Graphviz; + + //Controlling Panning & Zooming + zoom(enable: boolean): Graphviz; + zoomBehavior(): ZoomBehavior | null; + zoomSelection(): any | null; + zoomScaleExtent(extent?: number[]): Graphviz; + zoomTranslateExtent(extent?: number[][]): Graphviz; + resetZoom(transition?: any): any; + + //Maintaining Object Constancy + keyMode(keyMode: string): Graphviz; //keyMode should be an enum + + //Customizing Graph Attributes + attributer(callback: Function | null): Graphviz; + + //Accessing Extracted Data + data(): any; + + //Modifying an Existing Graph and Animating the Changes + //Edges + drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; + updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; + moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): Graphviz; + insertDrawnEdge(name: string): Graphviz; + removeDrawnEdge(): Graphviz; + drawnEdgeSelection(): any; + //Nodes + drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; + moveDrawnNode(x: number, y: number, options?: NodeOptions): Graphviz; + inserDrawnNode(nodeId: string): Graphviz; + removeDrawnNode(): Graphviz; + drawnNodeSelection(): Selection; + + //Large Graphs + totalMemory(size: number): Graphviz; + } + export interface GraphvizOptions { useWorker?: boolean, engine?: string, @@ -56,51 +136,4 @@ declare module 'd3-graphviz' { export interface NodeOptions { } - - export interface Graphviz { - engine(engine: string): Graphviz; //engine should be an enum - addImage(path: string, width: number, height: number): Graphviz; //Width & height can be strings, i.e. '100px' - totalMemory(size: number): Graphviz; - keyMode(keyMode: string): Graphviz; //keyMode should be an enum - fade(enable: boolean): Graphviz; - tweenPaths(enable: boolean): Graphviz; - tweenShapes(enable: boolean): Graphviz; - convertEqualSidedPolygons(enable: boolean): Graphviz; - tweenPrecision(precision: number): Graphviz; //precision can be a string, i.e. '50%' - growEnteringEdges(enable: boolean): Graphviz; - zoom(enable: boolean): Graphviz; - resetZoom(transition?: any): any; - zoomBehavior(): ZoomBehavior | null; - zoomSelection(): any | null; - zoomScaleExtent(extent?: number[]): Graphviz; - zoomTranslateExtent(extent?: number[][]): Graphviz; - render(callback?: Function): Graphviz; - dot(src: any, callback?: () => void): Graphviz; - data(): any; - renderDot(src: string, callback?: any): Graphviz; - transition(name: any): Graphviz; - active(name?: any): any; //Returns a transition, what type? - options(): GraphvizOptions; - options(options: GraphvizOptions): Graphviz; - width(width: number): Graphviz; - height(height: number): Graphviz; - scale(scale: number): Graphviz; - fit(fit: boolean): Graphviz; - attributer(callback: Function | null): Graphviz; - on(typenames: string, callback?: () => void): any; - onerror(callback: any): any; - logEvents(enable: boolean): Graphviz; - drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; - updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; - moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): Graphviz; - insertDrawnEdge(name: string): Graphviz; - removeDrawnEdge(): Graphviz; - drawnEdgeSelection(): any; - drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; - updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; - moveDrawnNode(x: number, y: number, options?: NodeOptions): Graphviz; - inserDrawnNode(nodeId: string): Graphviz; - removeDrawnNode(): Graphviz; - drawnNodeSelection(): Selection; - } } From 6167bf2f9c366ae7c1cb39fb3197721c30dd5d3b Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 16:14:43 +0100 Subject: [PATCH 0026/1121] Added Engine type --- types/d3-graphviz/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index ebb97df2cb..9c344995d4 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -32,7 +32,7 @@ declare module 'd3-graphviz' { renderDot(src: string, callback?: any): Graphviz; dot(src: any, callback?: () => void): Graphviz; render(callback?: Function): Graphviz; - engine(engine: string): Graphviz; //engine should be an enum + engine(engine: Engine): Graphviz; onerror(callback: any): any; //Images @@ -102,10 +102,12 @@ declare module 'd3-graphviz' { //Large Graphs totalMemory(size: number): Graphviz; } + + type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | 'twopi'; export interface GraphvizOptions { useWorker?: boolean, - engine?: string, + engine?: Engine, totalMemory?: number, keyMode?: string, fade?: boolean, From 0fc3a2952152bfb9fdfe50d63b9e6021d6266ee0 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 16:17:08 +0100 Subject: [PATCH 0027/1121] Added TypeNames type --- types/d3-graphviz/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 9c344995d4..1adbba9be2 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -49,7 +49,7 @@ declare module 'd3-graphviz' { scale(scale: number): Graphviz; //Control Flow - on(typenames: string, callback?: () => void): any; + on(typenames: TypeNames, callback?: () => void): any; logEvents(enable: boolean): Graphviz; //Controlling Fade @@ -104,6 +104,11 @@ declare module 'd3-graphviz' { } type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | 'twopi'; + + type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | + 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | + 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | + 'resotreEnd' | 'end'; export interface GraphvizOptions { useWorker?: boolean, From 2ec51b3f48835d4d152c3469091a472715f8dbd1 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 12 Oct 2018 16:18:21 +0100 Subject: [PATCH 0028/1121] Added KeyMode type --- types/d3-graphviz/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 1adbba9be2..d6c98cd69a 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -75,7 +75,7 @@ declare module 'd3-graphviz' { resetZoom(transition?: any): any; //Maintaining Object Constancy - keyMode(keyMode: string): Graphviz; //keyMode should be an enum + keyMode(keyMode: KeyMode): Graphviz; //keyMode should be an enum //Customizing Graph Attributes attributer(callback: Function | null): Graphviz; @@ -109,12 +109,14 @@ declare module 'd3-graphviz' { 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | 'resotreEnd' | 'end'; + + type KeyMode = 'title' | 'id' | 'tag-index' | 'index'; export interface GraphvizOptions { useWorker?: boolean, engine?: Engine, totalMemory?: number, - keyMode?: string, + keyMode?: KeyMode, fade?: boolean, tweenPaths?: boolean, tweenShapes?: boolean, From 26288f843b2e76cbc10e974b583ab036450cc470 Mon Sep 17 00:00:00 2001 From: stabilo Date: Sun, 14 Oct 2018 18:56:45 +1000 Subject: [PATCH 0029/1121] @types/mongoose Add missing typings for MongooseError constructors --- types/mongoose/index.d.ts | 149 ++++++++++++++++++++++++++++--- types/mongoose/mongoose-tests.ts | 98 +++++++++++++++++--- 2 files changed, 226 insertions(+), 21 deletions(-) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 19551684e0..b0b6727b49 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -13,6 +13,7 @@ // Idan Dardikman // Dominik Heigl // Fazendaaa +// stablio // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -479,15 +480,6 @@ declare module "mongoose" { static STATES: any; } - /* - * section error/validation.js - * http://mongoosejs.com/docs/api.html#error-validation-js - */ - class ValidationError extends Error { - /** Console.log helper */ - toString(): string; - } - /* * section error.js * http://mongoosejs.com/docs/api.html#error-js @@ -512,6 +504,143 @@ declare module "mongoose" { /** For backwards compatibility. Same as mongoose.Error.messages */ static Messages: any; + + } + + module Error { + + /** + * section error/notFound.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.DocumentNotFoundError + * + * An instance of this error class will be returned when `save()` fails + * because the underlying + * document was not found. The constructor takes one parameter, the + * conditions that mongoose passed to `update()` when trying to update + * the document. + */ + export class DocumentNotFoundError extends Error { + } + + /** + * section error/cast.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.CastError + * + * An instance of this error class will be returned when mongoose failed to + * cast a value. + */ + export class CastError extends Error { + stringValue: string; + kind: string; + path: string; + value: any; + reason?: any; + model?: any; + + constructor(type: string, value: any, path: string, reason?: NativeError); + + setModel(model: any): void; + } + + /** + * section error/validation.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ValidationError + * + * An instance of this error class will be returned when [validation](http://mongoosejs.com/docs/validation.html) failed. + */ + export class ValidationError extends Error { + errors: any; + + constructor(instance: MongooseDocument); + + /** Console.log helper */ + toString(): string; + + inspect(): object; + + toJSON(): object; + + addError(path: string, error: any): void; + } + + /** + * section error/validator.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ValidatorError + * + * A `ValidationError` has a hash of `errors` that contain individual `ValidatorError` instances + */ + export class ValidatorError extends Error { + properties: any; + kind: string; + path: string; + value: any; + reason: any; + + constructor(properties: any); + + formatMessage(msg: string | Function, properties: any): string; + + toString(): string; + } + + /** + * section error/version.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.VersionError + * + * An instance of this error class will be returned when you call `save()` after + * the document in the database was changed in a potentially unsafe way. See + * the [`versionKey` option](http://mongoosejs.com/docs/guide.html#versionKey) for more information. + */ + export class VersionError extends Error { + version: any; + modifiedPaths: Array; + + constructor(doc: MongooseDocument, currentVersion: any, modifiedPaths: any); + } + + /** + * section error/parallelSave.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ParallelSaveError + * + * An instance of this error class will be returned when you call `save()` multiple + * times on the same document in parallel. See the [FAQ](http://mongoosejs.com/docs/faq.html) for more + * information. + */ + export class ParallelSaveError extends Error { + constructor(doc: MongooseDocument); + } + + /** + * section error/overwriteModel.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.OverwriteModelError + * + * Thrown when a model with the given name was already registered on the connection. + * See [the FAQ about `OverwriteModelError`](http://mongoosejs.com/docs/faq.html#overwrite-model-error). + */ + export class OverwriteModelError extends Error { + constructor(name: string); + } + + /** + * section error/missingSchema.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.MissingSchemaError + * + * Thrown when you try to access a model that has not been registered yet + */ + export class MissingSchemaError extends Error { + constructor(name: string); + } + + /** + * section error/divergentArray.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.DivergentArrayError + * + * An instance of this error will be returned if you used an array projection + * and then modified the array in an unsafe way. + */ + export class DivergentArrayError extends Error { + constructor(paths: Array); + } } interface EachAsyncOptions { @@ -1166,7 +1295,7 @@ declare module "mongoose" { * @param kind optional kind property for the error * @returns the current ValidationError, with all currently invalidated paths */ - invalidate(path: string, errorMsg: string | NativeError, value: any, kind?: string): ValidationError | boolean; + invalidate(path: string, errorMsg: string | NativeError, value: any, kind?: string): Error.ValidationError | boolean; /** Returns true if path was directly set and modified, else false. */ isDirectModified(path: string): boolean; diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index 20b24ba887..87d61cbdd4 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -166,17 +166,6 @@ const getDB = async (tenant: string)=> { return conn1.useDb(tenant); }; - -/* - * section error/validation.js - * http://mongoosejs.com/docs/api.html#error-validation-js - */ -var validationError = {}; -validationError.toString().toLowerCase(); -/* inherited properties */ -validationError.stack; -validationError.message; - /* * section error.js * http://mongoosejs.com/docs/api.html#error-js @@ -190,6 +179,93 @@ mongooseError.stack; mongoose.Error.messages.hasOwnProperty(''); mongoose.Error.Messages.hasOwnProperty(''); +/* + * section error/cast.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.CastError + */ +var castError: mongoose.Error.CastError = new mongoose.Error.CastError('', '', ''); +castError.setModel('foo'); +castError.stringValue; +castError.kind; +castError.path; +castError.value; +/* inherited properties */ +castError.name; +castError.stack; +castError.message; + +/* + * section error/validator.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ValidatorError + */ +var validatorError: mongoose.Error.ValidatorError = new mongoose.Error.ValidatorError({ foo: 'bar' }) +validatorError.properties; +validatorError.kind; +validatorError.path; +validatorError.value; +validatorError.toString().toLowerCase(); +validatorError.formatMessage('foo', {}); +validatorError.formatMessage('foo', (bar: any)=>{ return bar; }); +/* inherited properties */ +validatorError.name; +validatorError.stack; +validatorError.message; + +/* + * section error/validation.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ValidationError + */ +var doc = {}; +var validationError: mongoose.Error.ValidationError = new mongoose.Error.ValidationError(doc); +validationError.toString().toLowerCase(); +validationError.inspect(); +validationError.toJSON().hasOwnProperty(''); +validationError.addError('foo', validatorError) +/* inherited properties */ +validationError.name; +validationError.stack; +validationError.message; + +/* + * section error/parallelSave.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.ParallelSaveError + */ +var parallelSaveError: mongoose.Error.ParallelSaveError = new mongoose.Error.ParallelSaveError(doc); +/* inherited properties */ +parallelSaveError.name; +parallelSaveError.stack; +parallelSaveError.message; + +/* + * section error/overwriteModel.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.OverwriteModelError + */ +var overwriteModelError: mongoose.Error.OverwriteModelError = new mongoose.Error.OverwriteModelError('foo'); +/* inherited properties */ +overwriteModelError.name; +overwriteModelError.stack; +overwriteModelError.message; + +/* + * section error/missingSchema.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.MissingSchemaError + */ +var missingSchemaError: mongoose.Error.MissingSchemaError = new mongoose.Error.MissingSchemaError('foo'); +/* inherited properties */ +missingSchemaError.name; +missingSchemaError.stack; +missingSchemaError.message; + +/* + * section error/divergentArray.js + * https://mongoosejs.com/docs/api.html#mongooseerror_MongooseError.MissingSchemaError + */ +var missingSchemaError: mongoose.Error.DivergentArrayError = new mongoose.Error.DivergentArrayError(['foo','bar']); +/* inherited properties */ +missingSchemaError.name; +missingSchemaError.stack; +missingSchemaError.message; + const pluralize = mongoose.pluralize(); const plural: string = pluralize('foo'); From ff625a6a860a4116f9995fc5eafbdaa5ea308078 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 10:09:59 +0100 Subject: [PATCH 0030/1121] Added more definitions and comments --- types/d3-graphviz/index.d.ts | 113 ++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 43 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index d6c98cd69a..2774dab42a 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -7,7 +7,8 @@ declare module 'd3-graphviz' { import { ZoomBehavior } from 'd3-zoom' - import { Selection } from 'd3-selection' + import { Selection, BaseType } from 'd3-selection' + import { Transition } from 'd3-transition' module 'd3-selection' { interface Selection { @@ -23,86 +24,108 @@ declare module 'd3-graphviz' { */ export function graphviz(selector: string, options?: GraphvizOptions | boolean): Graphviz; + /** + * Interface representing the Graphviz Renderer. Methods generally return the instance of the + * object they were called on (i.e this) in order to allow for easy method chaining. + */ export interface Graphviz { //Options + /** + * Gets the currently set options object on the renderer + */ options(): GraphvizOptions; - options(options: GraphvizOptions): Graphviz; + + /** + * Sets the options provided. Does not overwrite existing options that are not + * provided in the options parameter. + * @param options the options to set on the renderer + */ + options(options: GraphvizOptions): this; //Rendering - renderDot(src: string, callback?: any): Graphviz; - dot(src: any, callback?: () => void): Graphviz; - render(callback?: Function): Graphviz; - engine(engine: Engine): Graphviz; - onerror(callback: any): any; + renderDot(src: string, callback?: any): this; + dot(src: string, callback?: () => void): this; + render(callback?: Function): this; + engine(engine: Engine): this; + onerror(callback: Function): this; //Images - addImage(path: string, width: number, height: number): Graphviz; //Width & height can be strings, i.e. '100px' + /** + * + * @param path + * @param width + * @param height + */ + addImage(path: string, width: number | string, height: number | string): this; //Creating Transitions - transition(name: any): Graphviz; - active(name?: any): any; //Returns a transition, what type? + transition(name?: Function | string | Transition): this; + active(name?: string): Transition | null; //Controlling SVG and Graph Size - width(width: number): Graphviz; - height(height: number): Graphviz; - fit(fit: boolean): Graphviz; - scale(scale: number): Graphviz; + width(width: number | string): this; + height(height: number | string): this; + fit(fit: boolean): this; + scale(scale: number): this; //Control Flow - on(typenames: TypeNames, callback?: () => void): any; - logEvents(enable: boolean): Graphviz; + on(typenames: TypeNames, callback?: () => void): this; + logEvents(enable: boolean): this; //Controlling Fade - fade(enable: boolean): Graphviz; + fade(enable: boolean): this; //Controlling Animated Growth of Entering Edges - growEnteringEdges(enable: boolean): Graphviz; + growEnteringEdges(enable: boolean): this; //Controlling Path Tweening - tweenPaths(enable: boolean): Graphviz; - tweenPrecision(precision: number): Graphviz; //precision can be a string, i.e. '50%' + tweenPaths(enable: boolean): this; + tweenPrecision(precision: number): this; //precision can be a string, i.e. '50%' //Controlling Shape Tweening - tweenShapes(enable: boolean): Graphviz; - convertEqualSidedPolygons(enable: boolean): Graphviz; + tweenShapes(enable: boolean): this; + convertEqualSidedPolygons(enable: boolean): this; //Controlling Panning & Zooming - zoom(enable: boolean): Graphviz; + zoom(enable: boolean): this; zoomBehavior(): ZoomBehavior | null; - zoomSelection(): any | null; - zoomScaleExtent(extent?: number[]): Graphviz; - zoomTranslateExtent(extent?: number[][]): Graphviz; - resetZoom(transition?: any): any; + zoomSelection(): Element | null; + zoomScaleExtent(extent?: number[]): this; + zoomTranslateExtent(extent?: number[][]): this; + resetZoom(transition?: string | Transition): this; //Maintaining Object Constancy - keyMode(keyMode: KeyMode): Graphviz; //keyMode should be an enum + keyMode(keyMode: KeyMode): this; //keyMode should be an enum //Customizing Graph Attributes - attributer(callback: Function | null): Graphviz; + attributer(callback: Function | null): this; //Accessing Extracted Data data(): any; //Modifying an Existing Graph and Animating the Changes //Edges - drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; - updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): Graphviz; - moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): Graphviz; - insertDrawnEdge(name: string): Graphviz; - removeDrawnEdge(): Graphviz; - drawnEdgeSelection(): any; + drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): this; + insertDrawnEdge(name: string): this; + removeDrawnEdge(): this; + drawnEdgeSelection(): Selection; //Nodes - drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; - updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): Graphviz; - moveDrawnNode(x: number, y: number, options?: NodeOptions): Graphviz; - inserDrawnNode(nodeId: string): Graphviz; - removeDrawnNode(): Graphviz; + drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; + moveDrawnNode(x: number, y: number, options?: NodeOptions): this; + inserDrawnNode(nodeId: string): this; + removeDrawnNode(): this; drawnNodeSelection(): Selection; //Large Graphs - totalMemory(size: number): Graphviz; + totalMemory(size: number): this; } + /** + * Enum defining the valid strings that can be passed in as an engine + */ type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | 'twopi'; type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | @@ -112,6 +135,10 @@ declare module 'd3-graphviz' { type KeyMode = 'title' | 'id' | 'tag-index' | 'index'; + /** + * Interface defining the options present on the Graphviz Renderer. + * Most map directly to methods that can be used to set their values. + */ export interface GraphvizOptions { useWorker?: boolean, engine?: Engine, @@ -126,8 +153,8 @@ declare module 'd3-graphviz' { zoom?: boolean, zoomScaleExtent?: number[], zoomTranslateExtent?: number[][], - width?: number, - height?: number, + width?: number | string, + height?: number | string, scale?: number, fit?: boolean, } From 453fa5e9a285bc53ece30e55936b64420a9cc837 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 10:31:36 +0100 Subject: [PATCH 0031/1121] Updated to use generics matching other d3 libraries --- types/d3-graphviz/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 2774dab42a..356f36c10d 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -12,7 +12,7 @@ declare module 'd3-graphviz' { module 'd3-selection' { interface Selection { - graphviz(options?: GraphvizOptions | boolean): Graphviz; + graphviz(options?: GraphvizOptions | boolean): Graphviz; selectWithoutDataPropagation(): Selection; } } @@ -22,13 +22,13 @@ declare module 'd3-graphviz' { * @param selector * @param options */ - export function graphviz(selector: string, options?: GraphvizOptions | boolean): Graphviz; + export function graphviz(selector: string | GElement, options?: GraphvizOptions | boolean): Graphviz; /** * Interface representing the Graphviz Renderer. Methods generally return the instance of the * object they were called on (i.e this) in order to allow for easy method chaining. */ - export interface Graphviz { + export interface Graphviz { //Options /** * Gets the currently set options object on the renderer @@ -59,8 +59,8 @@ declare module 'd3-graphviz' { addImage(path: string, width: number | string, height: number | string): this; //Creating Transitions - transition(name?: Function | string | Transition): this; - active(name?: string): Transition | null; + transition(name?: Function | string | Transition): this; + active(name?: string): Transition | null; //Controlling SVG and Graph Size width(width: number | string): this; @@ -88,11 +88,11 @@ declare module 'd3-graphviz' { //Controlling Panning & Zooming zoom(enable: boolean): this; - zoomBehavior(): ZoomBehavior | null; + zoomBehavior(): ZoomBehavior | null; zoomSelection(): Element | null; zoomScaleExtent(extent?: number[]): this; zoomTranslateExtent(extent?: number[][]): this; - resetZoom(transition?: string | Transition): this; + resetZoom(transition?: string | Transition): this; //Maintaining Object Constancy keyMode(keyMode: KeyMode): this; //keyMode should be an enum @@ -110,14 +110,14 @@ declare module 'd3-graphviz' { moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): this; insertDrawnEdge(name: string): this; removeDrawnEdge(): this; - drawnEdgeSelection(): Selection; + drawnEdgeSelection(): Selection; //Nodes drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; moveDrawnNode(x: number, y: number, options?: NodeOptions): this; inserDrawnNode(nodeId: string): this; removeDrawnNode(): this; - drawnNodeSelection(): Selection; + drawnNodeSelection(): Selection; //Large Graphs totalMemory(size: number): this; From e3a4185ba57fbbbb4b3770f6ee58434b9069fe14 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 10:48:35 +0100 Subject: [PATCH 0032/1121] Updated arrays to be fixed size --- types/d3-graphviz/index.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 356f36c10d..e08e1afb20 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -43,7 +43,7 @@ declare module 'd3-graphviz' { options(options: GraphvizOptions): this; //Rendering - renderDot(src: string, callback?: any): this; + renderDot(src: string, callback?: Function): this; dot(src: string, callback?: () => void): this; render(callback?: Function): this; engine(engine: Engine): this; @@ -90,8 +90,8 @@ declare module 'd3-graphviz' { zoom(enable: boolean): this; zoomBehavior(): ZoomBehavior | null; zoomSelection(): Element | null; - zoomScaleExtent(extent?: number[]): this; - zoomTranslateExtent(extent?: number[][]): this; + zoomScaleExtent(extent?: [number, number]): this; + zoomTranslateExtent(extent?: [[number, number], [number, number]]): this; resetZoom(transition?: string | Transition): this; //Maintaining Object Constancy @@ -134,7 +134,7 @@ declare module 'd3-graphviz' { 'resotreEnd' | 'end'; type KeyMode = 'title' | 'id' | 'tag-index' | 'index'; - + /** * Interface defining the options present on the Graphviz Renderer. * Most map directly to methods that can be used to set their values. @@ -151,8 +151,8 @@ declare module 'd3-graphviz' { tweenPrecision?: number, growEnteringEdges?: boolean, zoom?: boolean, - zoomScaleExtent?: number[], - zoomTranslateExtent?: number[][], + zoomScaleExtent?: [number, number], + zoomTranslateExtent?: [[number, number], [number, number]], width?: number | string, height?: number | string, scale?: number, From d2bfcec67efabde3b08b7763b3a796bbcf0fd355 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 13:26:43 +0100 Subject: [PATCH 0033/1121] Added documentation --- types/d3-graphviz/index.d.ts | 334 ++++++++++++++++++++++++++++++++--- 1 file changed, 308 insertions(+), 26 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index e08e1afb20..0646df0f3b 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -10,17 +10,33 @@ declare module 'd3-graphviz' { import { Selection, BaseType } from 'd3-selection' import { Transition } from 'd3-transition' + /** + * Define methods which act as extensions to d3-selection + */ module 'd3-selection' { interface Selection { + /** + * Returns a new graphviz renderer instance on the first element in the given selection. If a graphviz renderer instance already exists + * on that element, instead returns the existing graphviz renderer instance. + * @param options either a GraphvizOptions object representing the options of the graphviz renderer or a boolean representing the + * useWorker option. + */ graphviz(options?: GraphvizOptions | boolean): Graphviz; + + /** + * For each selected element, selects the first descendant element that matches the specified selector string in the same ways as + * d3-selection.select, but does not propagate any associated data from the current element to the corresponding selected element. + */ selectWithoutDataPropagation(): Selection; } } /** - * - * @param selector - * @param options + * Creates a new graphviz renderer instance on the first element matching the given selector string. If the selector is not a string, + * instead creates a new graphviz renderer instance on the specified node. If a graphviz renderer instance already exists on that + * element, instead returns the existing graphviz renderer instance. + * @param selector either a string representing a selector for a given node or an instance of a node + * @param options the options to be applied to the graphviz renderer */ export function graphviz(selector: string | GElement, options?: GraphvizOptions | boolean): Graphviz; @@ -34,7 +50,7 @@ declare module 'd3-graphviz' { * Gets the currently set options object on the renderer */ options(): GraphvizOptions; - + /** * Sets the options provided. Does not overwrite existing options that are not * provided in the options parameter. @@ -43,83 +59,334 @@ declare module 'd3-graphviz' { options(options: GraphvizOptions): this; //Rendering + /** + * Renders an SVG graph from the specified src string and appends it to the selection the grapviz + * renderer instance was generated on. + * @param src a string representing a valid string in the DOT language + * @param callback + */ renderDot(src: string, callback?: Function): this; + + /** + * Starts computation of the layout of a graph from the specified dotSrc string and saves the data for + * rendering the SVG with {@link render} at a later stage. + * @param src a string representing a valid string in the DOT language + * @param callback + */ dot(src: string, callback?: () => void): this; + + /** + * Starts rendering of an SVG graph from data saved by {@link dot} and appends it to the selection + * the grapviz renderer instance was generated on. + * @param callback + */ render(callback?: Function): this; + + /** + * Sets the Graphviz layout engine name to the specified engine string. + * @param engine a string taking one of the following values: + * - circo + * - dot + * - fdp + * - neato + * - osage + * - patchwork + * - twopi + */ engine(engine: Engine): this; - onerror(callback: Function): this; + + /** + * Sets the callback that is called if the layout computation encounters + * an error. If no callback is passed then it removes the existing callback. + * @param callback the call back function triggered by an error + */ + onerror(callback?: Function): this; //Images /** - * - * @param path - * @param width - * @param height + * Add an image reference. Must be called before {@link renderDot} ir {@link dot} + * are called. + * @param path the path of the image, may be a filename, relative or absolute path or a URL + * @param width the width of the image, if a string is used then it may specify units. Allowed + * units are: in, px, pc, pt, cm, or mm. If no units are given or dimensions are + * given as numbers, points (pt) are used. + * @param height the height of the image, which follows the same unit rules as width. */ addImage(path: string, width: number | string, height: number | string): this; //Creating Transitions transition(name?: Function | string | Transition): this; + + /** + * Returns the active transition on the generated graph's top level svg with the specified name, + * if any. Returns null if there is no such active transition on the top level svg node. + * @param name the name of the transition + */ active(name?: string): Transition | null; //Controlling SVG and Graph Size - width(width: number | string): this; - height(height: number | string): this; + /** + * Sets the SVG width attribute. + * @param width the width in pixels + */ + width(width: number): this; + + /** + * Sets the SVG height attribute + * @param height the height in pixels + */ + height(height: number): this; + + /** + * Sets whether the graph's viewbox is affected by the size of its parent SVG's size + * @param fit true, if the graph should scale to fit its parent, false if it should + * remain at its original size + */ fit(fit: boolean): this; + + /** + * Sets the value the graph should scale by in relation to its parent SVG. Scaling + * only occurs if fit is set to true + * @param scale the scale value with 1.0 being 100%, 0.5 being 50% etc. + */ scale(scale: number): this; //Control Flow + /** + * Adds or removes a listener to the graphviz renderer instance for the specified event typenames. + * @param typenames + * @param callback + */ on(typenames: TypeNames, callback?: () => void): this; + + /** + * Sets whether events are logged or not. + * @param enable true if events should be logged, false if not + */ logEvents(enable: boolean): this; //Controlling Fade + /** + * Sets whether fade in and out of nodes is enabled. + * @param enable true to enable fade in and out, false to disable + */ fade(enable: boolean): this; //Controlling Animated Growth of Entering Edges + /** + * Sets whether animated growth of entering edges is enabled. + * @param enable true to animate entering edges, false to disable + */ growEnteringEdges(enable: boolean): this; //Controlling Path Tweening + /** + * Enables or disables path tweening + * @param enable true if path tweening should be enabled, false if it should be disabled + */ tweenPaths(enable: boolean): this; - tweenPrecision(precision: number): this; //precision can be a string, i.e. '50%' + + /** + * Sets the precision of path tweening. If precision is a number, sets the precision used + * during path tweening to precision points. The precision is the length of each path + * segment during tweening. If instead precision is a string containing '%', sets the + * relative precision. + * @param precision the precision as either a number of a string containing a percentage + */ + tweenPrecision(precision: number | string): this; //Controlling Shape Tweening + /** + * Enables or disables shape tweening during transitions. Implicitly sets path tweening + * as enabled due to SVGs handling for them. + * @param enable true if shape tweening should be enabled, false if it should be disabled + */ tweenShapes(enable: boolean): this; + + /** + * Enables or disables conversion of polygons with an equal number of sides during shape + * tweening. + * @param enable true if conversion should be enabled, false if it should be disabled. + */ convertEqualSidedPolygons(enable: boolean): this; //Controlling Panning & Zooming + /** + * Enables or disables zooming and panning. + * @param enable true if zooming should be enabled, false if it should be disabled. + */ zoom(enable: boolean): this; + + /** + * Returns the zoom behaviour of a graph. If the zoom is disable or the graph has not + * yet been rendered then returns null. + */ zoomBehavior(): ZoomBehavior | null; + + /** + * Returns the selection to which zoom behaviour has been applied. If zoom is disabled + * or the graph has not yet been rendered then returns null. + */ zoomSelection(): Element | null; + + /** + * Sets the scale extend for zooming where the first number is the minimum allowed zoom + * and the second is the maximum. + * @param extent a tuple containing the minimum and maximum allowed zoom + */ zoomScaleExtent(extent?: [number, number]): this; + + /** + * Sets the translate extent which restricts panning. + * @param extent a tuple of the form ((x0, y0), (x1, y1)) where (x0, y0) is the top-left + * corner of the "world" and (x1, y1) is the bottom-right corner + */ zoomTranslateExtent(extent?: [[number, number], [number, number]]): this; + + /** + * Resets any transformations made by panning and zooming. + * @param transition an optional transition to apply during reset. + */ resetZoom(transition?: string | Transition): this; //Maintaining Object Constancy - keyMode(keyMode: KeyMode): this; //keyMode should be an enum + /** + * Sets the key mode to the the provided mode string. Must be set before passing in + * any DOT strings. + * @param keyMode + */ + keyMode(keyMode: KeyMode): this; //Customizing Graph Attributes + /** + * + * @param callback + */ attributer(callback: Function | null): this; //Accessing Extracted Data - data(): any; - + /** + * Returns the data extracted by {@link dot} or null if none exists. + */ + data(): Datum; + //Modifying an Existing Graph and Animating the Changes - //Edges - drawEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; - updateDrawnEdge(x1: number, x2: number, y1: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + //Edges + /** + * Draws a straight edge from (x1, y1) to (x2, y2) using coordinates relative to top level G container element of the graph. + * @param x1 the starting x co-ordinate + * @param y1 the starting y co-ordinate + * @param x2 the ending x co-ordinate + * @param y2 the ending y co-ordinate + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the edge + */ + drawEdge(x1: number, y1: number, x2: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + + /** + * Updates properties and attributes of the edge currently drawn with {@link drawEdge}, + * using the same arguments. This method cannot be used after the edge has been inserted + * into the graph data with {@link insertDrawnEdge.} + * @param x1 the starting x co-ordinate + * @param y1 the starting y co-ordinate + * @param x2 the ending x co-ordinate + * @param y2 the ending y co-ordinate + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the edge + */ + updateDrawnEdge(x1: number, y1: number, x2: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + + /** + * Updates the end point of the edge currently drawn with {@link drawEdge}, + * accepting the same options argument. This method cannot be used after the + * edge has been inserted into the graph data with {@link insertDrawnEdge}. + * @param x2 the ending x co-ordinate + * @param y2 the ending y co-ordinate + * @param options object containing the options used when drawing the edge + */ moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): this; + + /** + * Inserts the edge into the graph data, making it available for an animated + * transition into a subsequent new layout. + * @param name the name of the edge. + */ insertDrawnEdge(name: string): this; + + /** + * Removes the edge currently drawn with {@link drawEdge}. This method cannot + * be used after the edge has been inserted into the graph data with + * {@link insertDrawnEdge}. + */ removeDrawnEdge(): this; + + /** + * Returns a {@link Selection} containing the edge currently being drawn. The selection is empty + * if no edge has been drawn or the lastest drawn edge has been inserted into the graph data with + * {@link insertDrawnNode}. + */ drawnEdgeSelection(): Selection; - //Nodes + + //Nodes + /** + * Draws a node with the upper left corner of its bounding box at (x, y), using + * coordinates relative to the top level G container element of the graph. + * @param x x co-ordinate of the top-left bounding box of the node + * @param y y co-ordinate of the top-left bounding box of the node + * @param nodeId the ID of the node + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the node + */ drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; + + /** + * Updates properties and attributes of the node currently drawn with {@link drawNode}, + * using the same arguments. This method cannot be used after the node has been inserted + * into the graph data with {@link insertDrawnNode}. + * @param x x co-ordinate of the top-left bounding box of the node + * @param y y co-ordinate of the top-left bounding box of the node + * @param nodeId the ID of the node + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the node + */ updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; + + /** + * Updates the position of the upper left corner of the node currently drawn + * with {@link drawNode}, accepting the same options argument. This method + * cannot be used after the node has been inserted into the graph data with + * {@link insertDrawnNode}. + * @param x new x co-ordinate of the top-left bounding box of the node + * @param y new y co-ordinate of the top-left bounding box of the node + * @param options object containing the options used when drawing the node + */ moveDrawnNode(x: number, y: number, options?: NodeOptions): this; + + /** + * Inserts the node into the graph data, making it available for an animated + * transition into a subsequent new layout. + * @param nodeId the ID of the node + */ inserDrawnNode(nodeId: string): this; + + /** + * Removes the node currently drawn with {@link drawNode}. This method cannot + * be used after the node has been inserted into the graph data with {@link insertDrawnNode}. + */ removeDrawnNode(): this; + + /** + * Returns a {@link Selection} containing the node currently being drawn. The selection is empty + * if no node has been drawn or the lastest drawn node has been inserted into the graph data with + * {@link insertDrawnNode}. + */ drawnNodeSelection(): Selection; //Large Graphs + /** + * Sets the total memory available to Viz.js to size bytes, which should be a power of 2. + * @param size the size in bytes of memory allocated to Viz.js + */ totalMemory(size: number): this; } @@ -128,11 +395,17 @@ declare module 'd3-graphviz' { */ type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | 'twopi'; - type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | - 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | - 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | - 'resotreEnd' | 'end'; + /** + * Enum defining the valid strings that can be passed as TypeNames + */ + type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | + 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | + 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | + 'resotreEnd' | 'end' | string; //string included to allow for optional addition of a name, e.g. initEnd.foo + /** + * Enum defining the valid strings that can be passed as KeyModes + */ type KeyMode = 'title' | 'id' | 'tag-index' | 'index'; /** @@ -148,27 +421,36 @@ declare module 'd3-graphviz' { tweenPaths?: boolean, tweenShapes?: boolean, convertEqualSidedPolygons?: boolean, - tweenPrecision?: number, + tweenPrecision?: number | string, growEnteringEdges?: boolean, zoom?: boolean, zoomScaleExtent?: [number, number], zoomTranslateExtent?: [[number, number], [number, number]], - width?: number | string, - height?: number | string, + width?: number, + height?: number, scale?: number, fit?: boolean, } + /** + * Interface defining the attributes available per the DOT language + */ export interface DotAttributes { style: any; URL: any; tooltip: any; } + /** + * Interface defining the options available for rendering edges + */ export interface EdgeOptions { shortening: number; } + /** + * Interface defining the options available for rendering nodes + */ export interface NodeOptions { } From e4d1bfe44dd4c46d70ff9c7dfcf4c933feff27f8 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 13:35:58 +0100 Subject: [PATCH 0034/1121] Updated return type --- types/d3-graphviz/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 0646df0f3b..0ccece31cf 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -221,7 +221,7 @@ declare module 'd3-graphviz' { * Returns the zoom behaviour of a graph. If the zoom is disable or the graph has not * yet been rendered then returns null. */ - zoomBehavior(): ZoomBehavior | null; + zoomBehavior(): ZoomBehavior | null; /** * Returns the selection to which zoom behaviour has been applied. If zoom is disabled From 32d11daec7f7df3fc3a3aa856a58256b82b5d86e Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 14:05:33 +0100 Subject: [PATCH 0035/1121] Added some tests --- types/d3-graphviz/d3-graphviz-tests.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/types/d3-graphviz/d3-graphviz-tests.ts b/types/d3-graphviz/d3-graphviz-tests.ts index e69de29bb2..eef9436a09 100644 --- a/types/d3-graphviz/d3-graphviz-tests.ts +++ b/types/d3-graphviz/d3-graphviz-tests.ts @@ -0,0 +1,16 @@ +import { select, BaseType } from 'd3-selection'; +import * as d3Graphviz from 'd3-graphviz'; + +let graphviz: d3Graphviz.Graphviz; + +// Can get a graphviz render using extension method on d3-select +graphviz = select('test').graphviz(); + +// Can use graphviz method as selector +graphviz = d3Graphviz.graphviz('test'); + +// Can get the options +const options: d3Graphviz.GraphvizOptions = d3Graphviz.graphviz('').options(); + +// Can set the options +graphviz = graphviz.options(options); From ab0992bd548d555dabbfb22aa03a9c8df7f1ff50 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 14:20:20 +0100 Subject: [PATCH 0036/1121] Made parameter optional --- types/d3-graphviz/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 0ccece31cf..bd2aac491a 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -262,7 +262,7 @@ declare module 'd3-graphviz' { * * @param callback */ - attributer(callback: Function | null): this; + attributer(callback?: Function): this; //Accessing Extracted Data /** From f1caa4586925e6cddedd0e745d56f9e5e780e592 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 14:23:56 +0100 Subject: [PATCH 0037/1121] Updated DOT attributes --- types/d3-graphviz/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index bd2aac491a..dfa04cb1b9 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -436,9 +436,9 @@ declare module 'd3-graphviz' { * Interface defining the attributes available per the DOT language */ export interface DotAttributes { - style: any; - URL: any; - tooltip: any; + style?: any; + URL?: any; + tooltip?: any; } /** From 65c4a2842f185b6097b7c5fe884aafcdde17d6d5 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 14:29:22 +0100 Subject: [PATCH 0038/1121] Updated callbacks --- types/d3-graphviz/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index dfa04cb1b9..682cbb2b2e 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -73,7 +73,7 @@ declare module 'd3-graphviz' { * @param src a string representing a valid string in the DOT language * @param callback */ - dot(src: string, callback?: () => void): this; + dot(src: string, callback?: Function): this; /** * Starts rendering of an SVG graph from data saved by {@link dot} and appends it to the selection @@ -157,7 +157,7 @@ declare module 'd3-graphviz' { * @param typenames * @param callback */ - on(typenames: TypeNames, callback?: () => void): this; + on(typenames: TypeNames, callback?: Function): this; /** * Sets whether events are logged or not. From 4c672ef8ed98317f1adf0a2c155bf6a1579b18b6 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 14:50:11 +0100 Subject: [PATCH 0039/1121] Linting fixes --- types/d3-graphviz/index.d.ts | 876 +++++++++++++++++------------------ 1 file changed, 433 insertions(+), 443 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 682cbb2b2e..f08ec0e019 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -4,454 +4,444 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -declare module 'd3-graphviz' { +import { ZoomBehavior } from 'd3-zoom'; +import { Selection, BaseType } from 'd3-selection'; +import { Transition } from 'd3-transition'; - import { ZoomBehavior } from 'd3-zoom' - import { Selection, BaseType } from 'd3-selection' - import { Transition } from 'd3-transition' - - /** - * Define methods which act as extensions to d3-selection - */ - module 'd3-selection' { - interface Selection { - /** - * Returns a new graphviz renderer instance on the first element in the given selection. If a graphviz renderer instance already exists - * on that element, instead returns the existing graphviz renderer instance. - * @param options either a GraphvizOptions object representing the options of the graphviz renderer or a boolean representing the - * useWorker option. - */ - graphviz(options?: GraphvizOptions | boolean): Graphviz; - - /** - * For each selected element, selects the first descendant element that matches the specified selector string in the same ways as - * d3-selection.select, but does not propagate any associated data from the current element to the corresponding selected element. - */ - selectWithoutDataPropagation(): Selection; - } - } - - /** - * Creates a new graphviz renderer instance on the first element matching the given selector string. If the selector is not a string, - * instead creates a new graphviz renderer instance on the specified node. If a graphviz renderer instance already exists on that - * element, instead returns the existing graphviz renderer instance. - * @param selector either a string representing a selector for a given node or an instance of a node - * @param options the options to be applied to the graphviz renderer - */ - export function graphviz(selector: string | GElement, options?: GraphvizOptions | boolean): Graphviz; - - /** - * Interface representing the Graphviz Renderer. Methods generally return the instance of the - * object they were called on (i.e this) in order to allow for easy method chaining. - */ - export interface Graphviz { - //Options +/** + * Define methods which act as extensions to d3-selection + */ +declare module 'd3-selection' { + interface Selection { /** - * Gets the currently set options object on the renderer + * Returns a new graphviz renderer instance on the first element in the given selection. If a graphviz renderer instance already exists + * on that element, instead returns the existing graphviz renderer instance. + * @param options either a GraphvizOptions object representing the options of the graphviz renderer or a boolean representing the + * useWorker option. */ - options(): GraphvizOptions; + graphviz(options?: GraphvizOptions | boolean): Graphviz; /** - * Sets the options provided. Does not overwrite existing options that are not - * provided in the options parameter. - * @param options the options to set on the renderer + * For each selected element, selects the first descendant element that matches the specified selector string in the same ways as + * d3-selection.select, but does not propagate any associated data from the current element to the corresponding selected element. */ - options(options: GraphvizOptions): this; - - //Rendering - /** - * Renders an SVG graph from the specified src string and appends it to the selection the grapviz - * renderer instance was generated on. - * @param src a string representing a valid string in the DOT language - * @param callback - */ - renderDot(src: string, callback?: Function): this; - - /** - * Starts computation of the layout of a graph from the specified dotSrc string and saves the data for - * rendering the SVG with {@link render} at a later stage. - * @param src a string representing a valid string in the DOT language - * @param callback - */ - dot(src: string, callback?: Function): this; - - /** - * Starts rendering of an SVG graph from data saved by {@link dot} and appends it to the selection - * the grapviz renderer instance was generated on. - * @param callback - */ - render(callback?: Function): this; - - /** - * Sets the Graphviz layout engine name to the specified engine string. - * @param engine a string taking one of the following values: - * - circo - * - dot - * - fdp - * - neato - * - osage - * - patchwork - * - twopi - */ - engine(engine: Engine): this; - - /** - * Sets the callback that is called if the layout computation encounters - * an error. If no callback is passed then it removes the existing callback. - * @param callback the call back function triggered by an error - */ - onerror(callback?: Function): this; - - //Images - /** - * Add an image reference. Must be called before {@link renderDot} ir {@link dot} - * are called. - * @param path the path of the image, may be a filename, relative or absolute path or a URL - * @param width the width of the image, if a string is used then it may specify units. Allowed - * units are: in, px, pc, pt, cm, or mm. If no units are given or dimensions are - * given as numbers, points (pt) are used. - * @param height the height of the image, which follows the same unit rules as width. - */ - addImage(path: string, width: number | string, height: number | string): this; - - //Creating Transitions - transition(name?: Function | string | Transition): this; - - /** - * Returns the active transition on the generated graph's top level svg with the specified name, - * if any. Returns null if there is no such active transition on the top level svg node. - * @param name the name of the transition - */ - active(name?: string): Transition | null; - - //Controlling SVG and Graph Size - /** - * Sets the SVG width attribute. - * @param width the width in pixels - */ - width(width: number): this; - - /** - * Sets the SVG height attribute - * @param height the height in pixels - */ - height(height: number): this; - - /** - * Sets whether the graph's viewbox is affected by the size of its parent SVG's size - * @param fit true, if the graph should scale to fit its parent, false if it should - * remain at its original size - */ - fit(fit: boolean): this; - - /** - * Sets the value the graph should scale by in relation to its parent SVG. Scaling - * only occurs if fit is set to true - * @param scale the scale value with 1.0 being 100%, 0.5 being 50% etc. - */ - scale(scale: number): this; - - //Control Flow - /** - * Adds or removes a listener to the graphviz renderer instance for the specified event typenames. - * @param typenames - * @param callback - */ - on(typenames: TypeNames, callback?: Function): this; - - /** - * Sets whether events are logged or not. - * @param enable true if events should be logged, false if not - */ - logEvents(enable: boolean): this; - - //Controlling Fade - /** - * Sets whether fade in and out of nodes is enabled. - * @param enable true to enable fade in and out, false to disable - */ - fade(enable: boolean): this; - - //Controlling Animated Growth of Entering Edges - /** - * Sets whether animated growth of entering edges is enabled. - * @param enable true to animate entering edges, false to disable - */ - growEnteringEdges(enable: boolean): this; - - //Controlling Path Tweening - /** - * Enables or disables path tweening - * @param enable true if path tweening should be enabled, false if it should be disabled - */ - tweenPaths(enable: boolean): this; - - /** - * Sets the precision of path tweening. If precision is a number, sets the precision used - * during path tweening to precision points. The precision is the length of each path - * segment during tweening. If instead precision is a string containing '%', sets the - * relative precision. - * @param precision the precision as either a number of a string containing a percentage - */ - tweenPrecision(precision: number | string): this; - - //Controlling Shape Tweening - /** - * Enables or disables shape tweening during transitions. Implicitly sets path tweening - * as enabled due to SVGs handling for them. - * @param enable true if shape tweening should be enabled, false if it should be disabled - */ - tweenShapes(enable: boolean): this; - - /** - * Enables or disables conversion of polygons with an equal number of sides during shape - * tweening. - * @param enable true if conversion should be enabled, false if it should be disabled. - */ - convertEqualSidedPolygons(enable: boolean): this; - - //Controlling Panning & Zooming - /** - * Enables or disables zooming and panning. - * @param enable true if zooming should be enabled, false if it should be disabled. - */ - zoom(enable: boolean): this; - - /** - * Returns the zoom behaviour of a graph. If the zoom is disable or the graph has not - * yet been rendered then returns null. - */ - zoomBehavior(): ZoomBehavior | null; - - /** - * Returns the selection to which zoom behaviour has been applied. If zoom is disabled - * or the graph has not yet been rendered then returns null. - */ - zoomSelection(): Element | null; - - /** - * Sets the scale extend for zooming where the first number is the minimum allowed zoom - * and the second is the maximum. - * @param extent a tuple containing the minimum and maximum allowed zoom - */ - zoomScaleExtent(extent?: [number, number]): this; - - /** - * Sets the translate extent which restricts panning. - * @param extent a tuple of the form ((x0, y0), (x1, y1)) where (x0, y0) is the top-left - * corner of the "world" and (x1, y1) is the bottom-right corner - */ - zoomTranslateExtent(extent?: [[number, number], [number, number]]): this; - - /** - * Resets any transformations made by panning and zooming. - * @param transition an optional transition to apply during reset. - */ - resetZoom(transition?: string | Transition): this; - - //Maintaining Object Constancy - /** - * Sets the key mode to the the provided mode string. Must be set before passing in - * any DOT strings. - * @param keyMode - */ - keyMode(keyMode: KeyMode): this; - - //Customizing Graph Attributes - /** - * - * @param callback - */ - attributer(callback?: Function): this; - - //Accessing Extracted Data - /** - * Returns the data extracted by {@link dot} or null if none exists. - */ - data(): Datum; - - //Modifying an Existing Graph and Animating the Changes - //Edges - /** - * Draws a straight edge from (x1, y1) to (x2, y2) using coordinates relative to top level G container element of the graph. - * @param x1 the starting x co-ordinate - * @param y1 the starting y co-ordinate - * @param x2 the ending x co-ordinate - * @param y2 the ending y co-ordinate - * @param attributes object containing DOT attributes - * @param options object containing the options used when drawing the edge - */ - drawEdge(x1: number, y1: number, x2: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; - - /** - * Updates properties and attributes of the edge currently drawn with {@link drawEdge}, - * using the same arguments. This method cannot be used after the edge has been inserted - * into the graph data with {@link insertDrawnEdge.} - * @param x1 the starting x co-ordinate - * @param y1 the starting y co-ordinate - * @param x2 the ending x co-ordinate - * @param y2 the ending y co-ordinate - * @param attributes object containing DOT attributes - * @param options object containing the options used when drawing the edge - */ - updateDrawnEdge(x1: number, y1: number, x2: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; - - /** - * Updates the end point of the edge currently drawn with {@link drawEdge}, - * accepting the same options argument. This method cannot be used after the - * edge has been inserted into the graph data with {@link insertDrawnEdge}. - * @param x2 the ending x co-ordinate - * @param y2 the ending y co-ordinate - * @param options object containing the options used when drawing the edge - */ - moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): this; - - /** - * Inserts the edge into the graph data, making it available for an animated - * transition into a subsequent new layout. - * @param name the name of the edge. - */ - insertDrawnEdge(name: string): this; - - /** - * Removes the edge currently drawn with {@link drawEdge}. This method cannot - * be used after the edge has been inserted into the graph data with - * {@link insertDrawnEdge}. - */ - removeDrawnEdge(): this; - - /** - * Returns a {@link Selection} containing the edge currently being drawn. The selection is empty - * if no edge has been drawn or the lastest drawn edge has been inserted into the graph data with - * {@link insertDrawnNode}. - */ - drawnEdgeSelection(): Selection; - - //Nodes - /** - * Draws a node with the upper left corner of its bounding box at (x, y), using - * coordinates relative to the top level G container element of the graph. - * @param x x co-ordinate of the top-left bounding box of the node - * @param y y co-ordinate of the top-left bounding box of the node - * @param nodeId the ID of the node - * @param attributes object containing DOT attributes - * @param options object containing the options used when drawing the node - */ - drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; - - /** - * Updates properties and attributes of the node currently drawn with {@link drawNode}, - * using the same arguments. This method cannot be used after the node has been inserted - * into the graph data with {@link insertDrawnNode}. - * @param x x co-ordinate of the top-left bounding box of the node - * @param y y co-ordinate of the top-left bounding box of the node - * @param nodeId the ID of the node - * @param attributes object containing DOT attributes - * @param options object containing the options used when drawing the node - */ - updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: NodeOptions): this; - - /** - * Updates the position of the upper left corner of the node currently drawn - * with {@link drawNode}, accepting the same options argument. This method - * cannot be used after the node has been inserted into the graph data with - * {@link insertDrawnNode}. - * @param x new x co-ordinate of the top-left bounding box of the node - * @param y new y co-ordinate of the top-left bounding box of the node - * @param options object containing the options used when drawing the node - */ - moveDrawnNode(x: number, y: number, options?: NodeOptions): this; - - /** - * Inserts the node into the graph data, making it available for an animated - * transition into a subsequent new layout. - * @param nodeId the ID of the node - */ - inserDrawnNode(nodeId: string): this; - - /** - * Removes the node currently drawn with {@link drawNode}. This method cannot - * be used after the node has been inserted into the graph data with {@link insertDrawnNode}. - */ - removeDrawnNode(): this; - - /** - * Returns a {@link Selection} containing the node currently being drawn. The selection is empty - * if no node has been drawn or the lastest drawn node has been inserted into the graph data with - * {@link insertDrawnNode}. - */ - drawnNodeSelection(): Selection; - - //Large Graphs - /** - * Sets the total memory available to Viz.js to size bytes, which should be a power of 2. - * @param size the size in bytes of memory allocated to Viz.js - */ - totalMemory(size: number): this; - } - - /** - * Enum defining the valid strings that can be passed in as an engine - */ - type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | 'twopi'; - - /** - * Enum defining the valid strings that can be passed as TypeNames - */ - type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | - 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | - 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | - 'resotreEnd' | 'end' | string; //string included to allow for optional addition of a name, e.g. initEnd.foo - - /** - * Enum defining the valid strings that can be passed as KeyModes - */ - type KeyMode = 'title' | 'id' | 'tag-index' | 'index'; - - /** - * Interface defining the options present on the Graphviz Renderer. - * Most map directly to methods that can be used to set their values. - */ - export interface GraphvizOptions { - useWorker?: boolean, - engine?: Engine, - totalMemory?: number, - keyMode?: KeyMode, - fade?: boolean, - tweenPaths?: boolean, - tweenShapes?: boolean, - convertEqualSidedPolygons?: boolean, - tweenPrecision?: number | string, - growEnteringEdges?: boolean, - zoom?: boolean, - zoomScaleExtent?: [number, number], - zoomTranslateExtent?: [[number, number], [number, number]], - width?: number, - height?: number, - scale?: number, - fit?: boolean, - } - - /** - * Interface defining the attributes available per the DOT language - */ - export interface DotAttributes { - style?: any; - URL?: any; - tooltip?: any; - } - - /** - * Interface defining the options available for rendering edges - */ - export interface EdgeOptions { - shortening: number; - } - - /** - * Interface defining the options available for rendering nodes - */ - export interface NodeOptions { - + selectWithoutDataPropagation(): Selection; } } + +/** + * Creates a new graphviz renderer instance on the first element matching the given selector string. If the selector is not a string, + * instead creates a new graphviz renderer instance on the specified node. If a graphviz renderer instance already exists on that + * element, instead returns the existing graphviz renderer instance. + * @param selector either a string representing a selector for a given node or an instance of a node + * @param options the options to be applied to the graphviz renderer + */ +export function graphviz(selector: string | GElement, options?: GraphvizOptions | boolean): Graphviz; + +/** + * Interface representing the Graphviz Renderer. Methods generally return the instance of the + * object they were called on (i.e this) in order to allow for easy method chaining. + */ +export interface Graphviz { + // Options + /** + * Gets the currently set options object on the renderer + */ + options(): GraphvizOptions; + + /** + * Sets the options provided. Does not overwrite existing options that are not + * provided in the options parameter. + * @param options the options to set on the renderer + */ + options(options: GraphvizOptions): this; + + // Rendering + /** + * Renders an SVG graph from the specified src string and appends it to the selection the grapviz + * renderer instance was generated on. + * @param src a string representing a valid string in the DOT language + * @param callback + */ + renderDot(src: string, callback?: Function): this; + + /** + * Starts computation of the layout of a graph from the specified dotSrc string and saves the data for + * rendering the SVG with {@link render} at a later stage. + * @param src a string representing a valid string in the DOT language + * @param callback + */ + dot(src: string, callback?: Function): this; + + /** + * Starts rendering of an SVG graph from data saved by {@link dot} and appends it to the selection + * the grapviz renderer instance was generated on. + * @param callback + */ + render(callback?: Function): this; + + /** + * Sets the Graphviz layout engine name to the specified engine string. + * @param engine a string taking one of the following values: + * - circo + * - dot + * - fdp + * - neato + * - osage + * - patchwork + * - twopi + */ + engine(engine: Engine): this; + + /** + * Sets the callback that is called if the layout computation encounters + * an error. If no callback is passed then it removes the existing callback. + * @param callback the call back function triggered by an error + */ + onerror(callback?: Function): this; + + // Images + /** + * Add an image reference. Must be called before {@link renderDot} ir {@link dot} + * are called. + * @param path the path of the image, may be a filename, relative or absolute path or a URL + * @param width the width of the image, if a string is used then it may specify units. Allowed + * units are: in, px, pc, pt, cm, or mm. If no units are given or dimensions are + * given as numbers, points (pt) are used. + * @param height the height of the image, which follows the same unit rules as width. + */ + addImage(path: string, width: number | string, height: number | string): this; + + // Creating Transitions + transition(name?: Function | string | Transition): this; + + /** + * Returns the active transition on the generated graph's top level svg with the specified name, + * if any. Returns null if there is no such active transition on the top level svg node. + * @param name the name of the transition + */ + active(name?: string): Transition | null; + + // Controlling SVG and Graph Size + /** + * Sets the SVG width attribute. + * @param width the width in pixels + */ + width(width: number): this; + + /** + * Sets the SVG height attribute + * @param height the height in pixels + */ + height(height: number): this; + + /** + * Sets whether the graph's viewbox is affected by the size of its parent SVG's size + * @param fit true, if the graph should scale to fit its parent, false if it should + * remain at its original size + */ + fit(fit: boolean): this; + + /** + * Sets the value the graph should scale by in relation to its parent SVG. Scaling + * only occurs if fit is set to true + * @param scale the scale value with 1.0 being 100%, 0.5 being 50% etc. + */ + scale(scale: number): this; + + // Control Flow + /** + * Adds or removes a listener to the graphviz renderer instance for the specified event typenames. + * @param typenames + * @param callback + */ + on(typenames: TypeNames, callback?: Function): this; + + /** + * Sets whether events are logged or not. + * @param enable true if events should be logged, false if not + */ + logEvents(enable: boolean): this; + + // Controlling Fade + /** + * Sets whether fade in and out of nodes is enabled. + * @param enable true to enable fade in and out, false to disable + */ + fade(enable: boolean): this; + + // Controlling Animated Growth of Entering Edges + /** + * Sets whether animated growth of entering edges is enabled. + * @param enable true to animate entering edges, false to disable + */ + growEnteringEdges(enable: boolean): this; + + // Controlling Path Tweening + /** + * Enables or disables path tweening + * @param enable true if path tweening should be enabled, false if it should be disabled + */ + tweenPaths(enable: boolean): this; + + /** + * Sets the precision of path tweening. If precision is a number, sets the precision used + * during path tweening to precision points. The precision is the length of each path + * segment during tweening. If instead precision is a string containing '%', sets the + * relative precision. + * @param precision the precision as either a number of a string containing a percentage + */ + tweenPrecision(precision: number | string): this; + + // Controlling Shape Tweening + /** + * Enables or disables shape tweening during transitions. Implicitly sets path tweening + * as enabled due to SVGs handling for them. + * @param enable true if shape tweening should be enabled, false if it should be disabled + */ + tweenShapes(enable: boolean): this; + + /** + * Enables or disables conversion of polygons with an equal number of sides during shape + * tweening. + * @param enable true if conversion should be enabled, false if it should be disabled. + */ + convertEqualSidedPolygons(enable: boolean): this; + + // Controlling Panning & Zooming + /** + * Enables or disables zooming and panning. + * @param enable true if zooming should be enabled, false if it should be disabled. + */ + zoom(enable: boolean): this; + + /** + * Returns the zoom behaviour of a graph. If the zoom is disable or the graph has not + * yet been rendered then returns null. + */ + zoomBehavior(): ZoomBehavior | null; + + /** + * Returns the selection to which zoom behaviour has been applied. If zoom is disabled + * or the graph has not yet been rendered then returns null. + */ + zoomSelection(): Element | null; + + /** + * Sets the scale extend for zooming where the first number is the minimum allowed zoom + * and the second is the maximum. + * @param extent a tuple containing the minimum and maximum allowed zoom + */ + zoomScaleExtent(extent?: [number, number]): this; + + /** + * Sets the translate extent which restricts panning. + * @param extent a tuple of the form ((x0, y0), (x1, y1)) where (x0, y0) is the top-left + * corner of the "world" and (x1, y1) is the bottom-right corner + */ + zoomTranslateExtent(extent?: [[number, number], [number, number]]): this; + + /** + * Resets any transformations made by panning and zooming. + * @param transition an optional transition to apply during reset. + */ + resetZoom(transition?: string | Transition): this; + + // Maintaining Object Constancy + /** + * Sets the key mode to the the provided mode string. Must be set before passing in + * any DOT strings. + * @param keyMode + */ + keyMode(keyMode: KeyMode): this; + + // Customizing Graph Attributes + /** + * + * @param callback + */ + attributer(callback?: Function): this; + + // Accessing Extracted Data + /** + * Returns the data extracted by {@link dot} or null if none exists. + */ + data(): Datum; + + // Modifying an Existing Graph and Animating the Changes + // Edges + /** + * Draws a straight edge from (x1, y1) to (x2, y2) using coordinates relative to top level G container element of the graph. + * @param x1 the starting x co-ordinate + * @param y1 the starting y co-ordinate + * @param x2 the ending x co-ordinate + * @param y2 the ending y co-ordinate + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the edge + */ + drawEdge(x1: number, y1: number, x2: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + + /** + * Updates properties and attributes of the edge currently drawn with {@link drawEdge}, + * using the same arguments. This method cannot be used after the edge has been inserted + * into the graph data with {@link insertDrawnEdge.} + * @param x1 the starting x co-ordinate + * @param y1 the starting y co-ordinate + * @param x2 the ending x co-ordinate + * @param y2 the ending y co-ordinate + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the edge + */ + updateDrawnEdge(x1: number, y1: number, x2: number, y2: number, attributes?: DotAttributes, options?: EdgeOptions): this; + + /** + * Updates the end point of the edge currently drawn with {@link drawEdge}, + * accepting the same options argument. This method cannot be used after the + * edge has been inserted into the graph data with {@link insertDrawnEdge}. + * @param x2 the ending x co-ordinate + * @param y2 the ending y co-ordinate + * @param options object containing the options used when drawing the edge + */ + moveDrawnEdgeEndPoint(x2: number, y2: number, options?: EdgeOptions): this; + + /** + * Inserts the edge into the graph data, making it available for an animated + * transition into a subsequent new layout. + * @param name the name of the edge. + */ + insertDrawnEdge(name: string): this; + + /** + * Removes the edge currently drawn with {@link drawEdge}. This method cannot + * be used after the edge has been inserted into the graph data with + * {@link insertDrawnEdge}. + */ + removeDrawnEdge(): this; + + /** + * Returns a {@link Selection} containing the edge currently being drawn. The selection is empty + * if no edge has been drawn or the lastest drawn edge has been inserted into the graph data with + * {@link insertDrawnNode}. + */ + drawnEdgeSelection(): Selection; + + // Nodes + /** + * Draws a node with the upper left corner of its bounding box at (x, y), using + * coordinates relative to the top level G container element of the graph. + * @param x x co-ordinate of the top-left bounding box of the node + * @param y y co-ordinate of the top-left bounding box of the node + * @param nodeId the ID of the node + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the node, currently unused + */ + drawNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: any): this; + + /** + * Updates properties and attributes of the node currently drawn with {@link drawNode}, + * using the same arguments. This method cannot be used after the node has been inserted + * into the graph data with {@link insertDrawnNode}. + * @param x x co-ordinate of the top-left bounding box of the node + * @param y y co-ordinate of the top-left bounding box of the node + * @param nodeId the ID of the node + * @param attributes object containing DOT attributes + * @param options object containing the options used when drawing the node, currently unused + */ + updateDrawnNode(x: number, y: number, nodeId: string, attributes?: DotAttributes, options?: any): this; + + /** + * Updates the position of the upper left corner of the node currently drawn + * with {@link drawNode}, accepting the same options argument. This method + * cannot be used after the node has been inserted into the graph data with + * {@link insertDrawnNode}. + * @param x new x co-ordinate of the top-left bounding box of the node + * @param y new y co-ordinate of the top-left bounding box of the node + * @param options object containing the options used when drawing the node, currently unused + */ + moveDrawnNode(x: number, y: number, options?: any): this; + + /** + * Inserts the node into the graph data, making it available for an animated + * transition into a subsequent new layout. + * @param nodeId the ID of the node + */ + inserDrawnNode(nodeId: string): this; + + /** + * Removes the node currently drawn with {@link drawNode}. This method cannot + * be used after the node has been inserted into the graph data with {@link insertDrawnNode}. + */ + removeDrawnNode(): this; + + /** + * Returns a {@link Selection} containing the node currently being drawn. The selection is empty + * if no node has been drawn or the lastest drawn node has been inserted into the graph data with + * {@link insertDrawnNode}. + */ + drawnNodeSelection(): Selection; + + // Large Graphs + /** + * Sets the total memory available to Viz.js to size bytes, which should be a power of 2. + * @param size the size in bytes of memory allocated to Viz.js + */ + totalMemory(size: number): this; +} + +/** + * Enum defining the valid strings that can be passed in as an engine + */ +export type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | 'twopi'; + +/** + * Enum defining the valid strings that can be passed as TypeNames + */ +export type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | + 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | + 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | + 'resotreEnd' | 'end' | string; // string included to allow for optional addition of a name, e.g. initEnd.foo + +/** + * Enum defining the valid strings that can be passed as KeyModes + */ +export type KeyMode = 'title' | 'id' | 'tag-index' | 'index'; + +/** + * Interface defining the options present on the Graphviz Renderer. + * Most map directly to methods that can be used to set their values. + */ +export interface GraphvizOptions { + useWorker?: boolean; + engine?: Engine; + totalMemory?: number; + keyMode?: KeyMode; + fade?: boolean; + tweenPaths?: boolean; + tweenShapes?: boolean; + convertEqualSidedPolygons?: boolean; + tweenPrecision?: number | string; + growEnteringEdges?: boolean; + zoom?: boolean; + zoomScaleExtent?: [number, number]; + zoomTranslateExtent?: [[number, number], [number, number]]; + width?: number; + height?: number; + scale?: number; + fit?: boolean; +} + +/** + * Interface defining the attributes available per the DOT language + */ +export interface DotAttributes { + style?: any; + URL?: any; + tooltip?: any; +} + +/** + * Interface defining the options available for rendering edges + */ +export interface EdgeOptions { + shortening: number; +} From a40a7eada5938aec5ce1440f82d725aa83ab6e2b Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 15:02:29 +0100 Subject: [PATCH 0040/1121] Removed unnecessary generics --- types/d3-graphviz/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index f08ec0e019..12316c5147 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -36,7 +36,7 @@ declare module 'd3-selection' { * @param selector either a string representing a selector for a given node or an instance of a node * @param options the options to be applied to the graphviz renderer */ -export function graphviz(selector: string | GElement, options?: GraphvizOptions | boolean): Graphviz; +export function graphviz(selector: string | BaseType, options?: GraphvizOptions | boolean): Graphviz; /** * Interface representing the Graphviz Renderer. Methods generally return the instance of the From 3be54467eb7c187cc05ea3cca77c8472c4097906 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Mon, 15 Oct 2018 15:21:22 +0100 Subject: [PATCH 0041/1121] Updated callbacks --- types/d3-graphviz/index.d.ts | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 12316c5147..8d703309ed 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -5,7 +5,7 @@ // TypeScript Version: 2.3 import { ZoomBehavior } from 'd3-zoom'; -import { Selection, BaseType } from 'd3-selection'; +import { Selection, BaseType, ValueFn } from 'd3-selection'; import { Transition } from 'd3-transition'; /** @@ -63,7 +63,7 @@ export interface Graphviz void): this; /** * Starts computation of the layout of a graph from the specified dotSrc string and saves the data for @@ -71,14 +71,14 @@ export interface Graphviz void): this; /** * Starts rendering of an SVG graph from data saved by {@link dot} and appends it to the selection * the grapviz renderer instance was generated on. * @param callback */ - render(callback?: Function): this; + render(callback?: () => void): this; /** * Sets the Graphviz layout engine name to the specified engine string. @@ -98,7 +98,7 @@ export interface Graphviz void): this; // Images /** @@ -113,7 +113,15 @@ export interface Graphviz): this; + /** + * Applies the specified transition name to subsequent SVG rendering. Accepts the same arguments + * as {@link d3-select.transition} or a function, but returns the graph renderer instance, not the + * transition. If name is a function, it is taken to be a transition factory. A transition factory + * is a function that returns a transition. + * @param name either a function returning a transition, a transition object or a string naming a + * transition + */ + transition(name?: () => Transition | string | Transition): this; /** * Returns the active transition on the generated graph's top level svg with the specified name, @@ -155,7 +163,7 @@ export interface Graphviz void): this; /** * Sets whether events are logged or not. @@ -260,7 +268,7 @@ export interface Graphviz): this; // Accessing Extracted Data /** From 93e0c830c8555fa9da989414bcd452953060b6d5 Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Tue, 16 Oct 2018 09:06:13 +0100 Subject: [PATCH 0042/1121] Fixed incorrect method name --- types/d3-graphviz/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 8d703309ed..9d3dc1ac61 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -373,7 +373,7 @@ export interface Graphviz Date: Tue, 16 Oct 2018 10:05:50 -0500 Subject: [PATCH 0043/1121] Added @disabled testhook --- types/nightwatch/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index b6930fe90a..30a7e491e0 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -2173,6 +2173,7 @@ export interface NightwatchTestHooks { after?: NightwatchTestHook; beforeEach?: NightwatchTestHook; afterEach?: NightwatchTestHook; + '@disabled'?: boolean; } export type NightwatchTests = NightwatchTestFunctions | NightwatchTestHooks; From 4b0e2344274d46ca98270cc9a653e0b0fdc49593 Mon Sep 17 00:00:00 2001 From: xtrimsystems Date: Sat, 20 Oct 2018 21:51:02 +0200 Subject: [PATCH 0044/1121] Added value object MotorPins for pins in MotorOption, added class Motors and update SensorOption to use new attribute enabled --- types/johnny-five/index.d.ts | 31 +++++++++++++++++++++++--- types/johnny-five/johnny-five-tests.ts | 5 +++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/types/johnny-five/index.d.ts b/types/johnny-five/index.d.ts index eafa4038de..7fb54a53d2 100644 --- a/types/johnny-five/index.d.ts +++ b/types/johnny-five/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Toshiya Nakakura // Zoltan Ujvary // Simon Colmer +// XtrimSystems // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -514,9 +515,16 @@ export class Motion { on(event: "calibrated", cb: () => void): this; } +export interface MotorPins { + pwm: number; + dir: number; + cdir?: number; + brake?:number; +} + export interface MotorOption { - pins: any; - current?: any; + pins: MotorPins; + current?: SensorOption; invertPWM?: boolean; address?: number; controller?: string; @@ -540,6 +548,22 @@ export declare class Motor { release(): void; } +export declare class Motors { + constructor(option: Array | MotorOption[]); + + readonly isOn: boolean; + + forward(speed: number): void; + fwd(speed: number): void; + reverse(speed: number): void; + rev(speed: number): void; + start(): void; + start(speed: number): void; + stop(): void; + brake(): void; + release(): void; +} + export interface OrientiationOption { controller?: string; freq?: number; @@ -625,7 +649,7 @@ export declare class Ping { export declare interface ProximityOption { pin: number | string; controller: string; -} +} export declare interface ProximityData { cm: number; @@ -665,6 +689,7 @@ export interface SensorOption { pin: number | string; freq?: boolean; threshold?: number; + enabled?: boolean; } export declare class Sensor { diff --git a/types/johnny-five/johnny-five-tests.ts b/types/johnny-five/johnny-five-tests.ts index b2dd24904e..9d2b117344 100644 --- a/types/johnny-five/johnny-five-tests.ts +++ b/types/johnny-five/johnny-five-tests.ts @@ -155,6 +155,11 @@ board.on('ready', function(){ } }); + var motors = new five.Motors([ + { controller: 'PCA9685', pins: { pwm: 4, dir: 6 }}, + { controller: 'PCA9685', pins: { pwm: 5, dir: 7 }} + ]); + var piezo = new five.Piezo(3); // Plays a song From f5d60ed96459ab5c886de80b0896f32a425657d7 Mon Sep 17 00:00:00 2001 From: Will Soto Date: Sun, 21 Oct 2018 18:56:51 -0400 Subject: [PATCH 0045/1121] Update enum arguments to reflect latest signature See https://knexjs.org/#Schema-enum https://github.com/tgriesser/knex/pull/2632 https://github.com/tgriesser/knex/issues/394 Signed-off-by: Will Soto --- types/knex/index.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index 4d9b1b25f5..3aefe33dca 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Knex.js 0.14 +// Type definitions for Knex.js 0.15.2 // Project: https://github.com/tgriesser/knex // Definitions by: Qubo // Pablo Rodríguez @@ -444,8 +444,8 @@ declare namespace Knex { timestamp(columnName: string, standard?: boolean): ColumnBuilder; timestamps(useTimestampType?: boolean, makeDefaultNow?: boolean): ColumnBuilder; binary(columnName: string, length?: number): ColumnBuilder; - enum(columnName: string, values: Value[]): ColumnBuilder; - enu(columnName: string, values: Value[]): ColumnBuilder; + enum(columnName: string, values: Value[], options?: EnumOptions): ColumnBuilder; + enu(columnName: string, values: Value[], options?: EnumOptions): ColumnBuilder; json(columnName: string): ColumnBuilder; jsonb(columnName: string): ColumnBuilder; uuid(columnName: string): ColumnBuilder; @@ -517,6 +517,11 @@ declare namespace Knex { after(columnName: string): AlterColumnBuilder; } + interface EnumOptions { + useNative: boolean; + enumName: string; + } + // // Configurations // From 730393928c0de536fc827c64c72609eac92f11fe Mon Sep 17 00:00:00 2001 From: juwar Date: Mon, 22 Oct 2018 09:13:40 -0700 Subject: [PATCH 0046/1121] Add maxFontSize and minFontSize to series that have it. --- types/highcharts/index.d.ts | 110 +++++++++++++++++++++++++++++++++++- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index dcde50413d..d3036a869a 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -4644,6 +4644,14 @@ declare namespace Highcharts { * allows setting a separate color for the line without altering the fillColor. */ lineColor?: string | Gradient; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * A separate color for the negative part of the area. * @since 3.0 @@ -4742,6 +4750,10 @@ declare namespace Highcharts { * @since 2.3.0 */ grouping?: boolean; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; /** * The maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the * columns from becoming too wide when there is a small number of points in the chart. @@ -4749,6 +4761,10 @@ declare namespace Highcharts { * @since 4.1.8 */ maxPointWidth?: number | null; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * The minimal height for a column or width for a bar. By default, 0 values are not shown. To visualize a 0 (or * close to zero) point, set the minimal point length to a pixel value like 3. In stacked column charts, @@ -4843,6 +4859,10 @@ declare namespace Highcharts { * @since 3.0 */ displayNegative?: boolean; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; /** * Maximum bubble size. Bubbles will automatically size between the minSize and maxSize to reflect the z value of * each bubble. Can be either pixels (when no unit is given), or a percentage of the smallest one of the plot width @@ -4851,6 +4871,10 @@ declare namespace Highcharts { * @since 3.0 */ maxSize?: string | number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * Minimum bubble size. Bubbles will automatically size between the minSize and maxSize to reflect the z value of * each bubble. Can be either pixels (when no unit is given), or a percentage of the smallest one of the plot width @@ -5136,6 +5160,14 @@ declare namespace Highcharts { * Options for the dial or arrow pointer of the gauge. */ dial?: Dial; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * Allow the dial to overshoot the end of the perimeter axis by this many degrees. Say if the gauge axis goes from 0 * to 60, a value of 100, or 1000, will show 5 degrees beyond the end of the axis. Defaults to 0. @@ -5204,6 +5236,10 @@ declare namespace Highcharts { * @default 50 */ cropTreshold?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; /** * The maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the * columns from becoming too wide when there is a small number of points in the chart. @@ -5211,6 +5247,10 @@ declare namespace Highcharts { * @since 4.1.8 */ maxPointWidth?: number | null; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * The row size - how many Y axis units each heatmap row should span. * @default 1 @@ -5229,6 +5269,14 @@ declare namespace Highcharts { } interface LineChart extends SeriesChart { + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * Whether to apply steps to the line. Possible values are left, center and right. Prior to 2.3.5, only left was * supported. @@ -5299,6 +5347,14 @@ declare namespace Highcharts { * @since 2.0 */ innerSize?: number | string; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * The minimum size for a pie in response to auto margins. The pie will try to shrink to make room for data labels * in side the plot area, but only to this size. @@ -5346,6 +5402,14 @@ declare namespace Highcharts { * @default 0 */ lineWidth?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; } interface PyramidChart extends SeriesChart { @@ -5420,7 +5484,16 @@ declare namespace Highcharts { width?: number | string; } - interface ScatterChart extends SeriesChart { } + interface ScatterChart extends SeriesChart { + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; + } /** * A gauge showing values using a filled arc with colors indicating the value. The solid gauge plots values against the @@ -5456,7 +5529,16 @@ declare namespace Highcharts { wrap?: boolean; } - interface SplineChart extends SeriesChart { } + interface SplineChart extends SeriesChart { + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; + } /** * The size of the point shape is determined by its value relative to its siblings values. Requires the module @@ -5528,6 +5610,10 @@ declare namespace Highcharts { * Set options on specific levels. Takes precedence over series options, but not point options. */ levels?: TreeMapLevel[]; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; /** * The maximum allowed pixel width for a column, translated to the height of a bar in a bar chart. This prevents the * columns from becoming too wide when there is a small number of points in the chart. @@ -5535,6 +5621,10 @@ declare namespace Highcharts { * @since 4.1.8 */ maxPointWidth?: number | null; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * The sort index of the point inside the treemap level. * @since 4.1.10 @@ -5599,6 +5689,14 @@ declare namespace Highcharts { * @since 5.0.12 */ exposeElementToA11y?: boolean; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * This option decides which algorithm is used for placement, and rotation of a word. The choice of algorith is * therefore a crucial part of the resulting layout of the wordcloud. It is possible for users to add their own @@ -5799,6 +5897,14 @@ declare namespace Highcharts { * The sequential index of the series in the legend. */ legendIndex?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + maxFontSize?: number; + /** + * For area-like series, allow the font size to vary so that small areas get a smaller font size. The default applies this effect to area-like series but not line-like series. + */ + minFontSize?: number; /** * The name of the series as shown in the legend, tooltip etc. */ From 7cda494c6987dec64f6ceb59dccb14341d3ea49f Mon Sep 17 00:00:00 2001 From: juwar Date: Mon, 22 Oct 2018 09:21:02 -0700 Subject: [PATCH 0047/1121] Update version at top of file. --- types/highcharts/index.d.ts | 334 +++++++++++++++++++++++++++--------- 1 file changed, 255 insertions(+), 79 deletions(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index d3036a869a..7da3ac752d 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Highcharts 5.0.13 +// Type definitions for Highcharts 5.0.32 // Project: http://www.highcharts.com/ // Definitions by: Damiano Gambarotto // Dan Lewi Harkestad @@ -292,7 +292,7 @@ declare namespace Highcharts { * @default null * @since 2.3 */ - innerRadius?: number | string | null; + innerRadius?: number | string | null; /** * Text labels for the plot bands */ @@ -494,12 +494,12 @@ declare namespace Highcharts { shadow?: | boolean | { - color?: string | Gradient; - offsetX?: number; - offsetY?: number; - opacity?: number; - width?: number; - }; + color?: string | Gradient; + offsetX?: number; + offsetY?: number; + opacity?: number; + width?: number; + }; /** * The name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object. * @default "callout" @@ -1294,7 +1294,7 @@ declare namespace Highcharts { * Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. * The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color. */ - stops?: Array>; + stops?: Array>; /** * The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within * a chart. This option overrides the tickPixelInterval option. @@ -1859,7 +1859,9 @@ declare namespace Highcharts { interface Gradient { linearGradient?: LinearGradient | number[]; radialGradient?: { - cx: number; cy: number; r: number; + cx: number; + cy: number; + r: number; }; stops?: any[][]; /** @@ -2015,7 +2017,7 @@ declare namespace Highcharts { /** * The button stroke width */ - 'stroke-width'?: number; + "stroke-width"?: number; /** * The border radius */ @@ -3416,7 +3418,7 @@ declare namespace Highcharts { * @default ['50%', '50%'] * @since 2.3.0 */ - center?: Array; + center?: Array; /** * The end angle of the polar X axis or gauge value axis, given in degrees where 0 is north. * @default startAngle + 360 @@ -4033,7 +4035,7 @@ declare namespace Highcharts { halo?: boolean | Halo; } - interface PieStates extends BarStates, LineStates { } + interface PieStates extends BarStates, LineStates {} interface AreaZone { /** @@ -4682,11 +4684,9 @@ declare namespace Highcharts { dataLabels?: RangeDataLabels; } - interface AreaSplineChart extends AreaChart { - } + interface AreaSplineChart extends AreaChart {} - interface AreaSplineRangeChart extends AreaRangeChart { - } + interface AreaSplineRangeChart extends AreaRangeChart {} interface BarChart extends SeriesChart { /** @@ -4925,8 +4925,7 @@ declare namespace Highcharts { zThreshold?: number; } - interface ColumnChart extends BarChart { - } + interface ColumnChart extends BarChart {} /** * The column range is a cartesian series type with higher and lower Y values along an X axis. Requires @@ -5874,7 +5873,14 @@ declare namespace Highcharts { * [3, 7, 8] * */ - data?: Array; + data?: Array< + | number + | [number, number] + | [string, number] + | [string, number, number] + | [number, number, number] + | DataPoint + >; /** * A description of the series to add to the screen reader information about the series. * @since 5.0.0 @@ -5942,31 +5948,73 @@ declare namespace Highcharts { zIndex?: number; } - interface SeriesOptions extends IndividualSeriesOptions, SeriesChart { } + interface SeriesOptions extends IndividualSeriesOptions, SeriesChart {} - interface AreaChartSeriesOptions extends IndividualSeriesOptions, AreaChart { } - interface AreaRangeChartSeriesOptions extends IndividualSeriesOptions, AreaRangeChart { } - interface AreaSplineChartSeriesOptions extends IndividualSeriesOptions, AreaSplineChart { } - interface AreaSplineRangeChartSeriesOptions extends IndividualSeriesOptions, AreaSplineRangeChart { } - interface BarChartSeriesOptions extends IndividualSeriesOptions, BarChart { } - interface BoxPlotChartSeriesOptions extends IndividualSeriesOptions, BoxPlotChart { } - interface BubbleChartSeriesOptions extends IndividualSeriesOptions, BubbleChart { } - interface ColumnChartSeriesOptions extends IndividualSeriesOptions, ColumnChart { } - interface ColumnRangeChartSeriesOptions extends IndividualSeriesOptions, ColumnRangeChart { } - interface ErrorBarChartSeriesOptions extends IndividualSeriesOptions, ErrorBarChart { } - interface FunnelChartSeriesOptions extends IndividualSeriesOptions, FunnelChart { } - interface GaugeChartSeriesOptions extends IndividualSeriesOptions, GaugeChart { } - interface HeatMapSeriesOptions extends IndividualSeriesOptions, HeatMapChart { } - interface LineChartSeriesOptions extends IndividualSeriesOptions, LineChart { } - interface PieChartSeriesOptions extends IndividualSeriesOptions, PieChart { } - interface PolygonChartSeriesOptions extends IndividualSeriesOptions, PolygonChart { } - interface PyramidChartSeriesOptions extends IndividualSeriesOptions, PyramidChart { } - interface ScatterChartSeriesOptions extends IndividualSeriesOptions, ScatterChart { } - interface SolidGaugeChartSeriesOptions extends IndividualSeriesOptions, SolidGaugeChart { } - interface SplineChartSeriesOptions extends IndividualSeriesOptions, SplineChart { } - interface TreeMapChartSeriesOptions extends IndividualSeriesOptions, TreeMapChart { } - interface WaterFallChartSeriesOptions extends IndividualSeriesOptions, WaterFallChart { } - interface WordCloudChartSeriesOptions extends IndividualSeriesOptions, WordCloudChart { } + interface AreaChartSeriesOptions + extends IndividualSeriesOptions, + AreaChart {} + interface AreaRangeChartSeriesOptions + extends IndividualSeriesOptions, + AreaRangeChart {} + interface AreaSplineChartSeriesOptions + extends IndividualSeriesOptions, + AreaSplineChart {} + interface AreaSplineRangeChartSeriesOptions + extends IndividualSeriesOptions, + AreaSplineRangeChart {} + interface BarChartSeriesOptions extends IndividualSeriesOptions, BarChart {} + interface BoxPlotChartSeriesOptions + extends IndividualSeriesOptions, + BoxPlotChart {} + interface BubbleChartSeriesOptions + extends IndividualSeriesOptions, + BubbleChart {} + interface ColumnChartSeriesOptions + extends IndividualSeriesOptions, + ColumnChart {} + interface ColumnRangeChartSeriesOptions + extends IndividualSeriesOptions, + ColumnRangeChart {} + interface ErrorBarChartSeriesOptions + extends IndividualSeriesOptions, + ErrorBarChart {} + interface FunnelChartSeriesOptions + extends IndividualSeriesOptions, + FunnelChart {} + interface GaugeChartSeriesOptions + extends IndividualSeriesOptions, + GaugeChart {} + interface HeatMapSeriesOptions + extends IndividualSeriesOptions, + HeatMapChart {} + interface LineChartSeriesOptions + extends IndividualSeriesOptions, + LineChart {} + interface PieChartSeriesOptions extends IndividualSeriesOptions, PieChart {} + interface PolygonChartSeriesOptions + extends IndividualSeriesOptions, + PolygonChart {} + interface PyramidChartSeriesOptions + extends IndividualSeriesOptions, + PyramidChart {} + interface ScatterChartSeriesOptions + extends IndividualSeriesOptions, + ScatterChart {} + interface SolidGaugeChartSeriesOptions + extends IndividualSeriesOptions, + SolidGaugeChart {} + interface SplineChartSeriesOptions + extends IndividualSeriesOptions, + SplineChart {} + interface TreeMapChartSeriesOptions + extends IndividualSeriesOptions, + TreeMapChart {} + interface WaterFallChartSeriesOptions + extends IndividualSeriesOptions, + WaterFallChart {} + interface WordCloudChartSeriesOptions + extends IndividualSeriesOptions, + WordCloudChart {} interface DataPoint { /** @@ -6321,7 +6369,12 @@ declare namespace Highcharts { * * @default null */ - crosshairs?: boolean | [boolean, boolean] | CrosshairObject | [CrosshairObject, CrosshairObject] | null; + crosshairs?: + | boolean + | [boolean, boolean] + | CrosshairObject + | [CrosshairObject, CrosshairObject] + | null; /** * Enable or disable the tooltip. * @default true @@ -6380,7 +6433,11 @@ declare namespace Highcharts { * The return should be an object containing x and y values, for example { x: 100, y: 100 }. * @since 2.2.4 */ - positioner?(labelWidth: number, labelHeight: number, point: PlotPoint): { x: number; y: number; }; + positioner?( + labelWidth: number, + labelHeight: number, + point: PlotPoint + ): { x: number; y: number }; /** * Whether to apply a drop shadow to the tooltip. * @default true @@ -6751,7 +6808,13 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | Animation, eventArguments?: any): void; + setExtremes( + min?: number, + max?: number, + redraw?: boolean, + animation?: boolean | Animation, + eventArguments?: any + ): void; /** * Update the title of the axis after render time. * @param title The new title options on the same format as given in xAxis.title. @@ -6800,7 +6863,12 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 3.0 */ - addAxis(options: AxisOptions, isX?: boolean, redraw?: boolean, animation?: boolean | Animation): AxisObject; + addAxis( + options: AxisOptions, + isX?: boolean, + redraw?: boolean, + animation?: boolean | Animation + ): AxisObject; /** * Set a new credits label for the chart. * @param A configuration object for the credits as defined at credits. @@ -6815,7 +6883,11 @@ declare namespace Highcharts { * @param [boolean] redraw * @since 1.2.0 */ - addSeries(options: T, redraw?: boolean, animation?: boolean | Animation): SeriesObject; + addSeries( + options: T, + redraw?: boolean, + animation?: boolean | Animation + ): SeriesObject; /** * Add a series to the chart as drilldown from a specific point in the parent series. This method is used for async * drilldown, when clicking a point in a series should result in loading and displaying a more high-resolution @@ -6824,7 +6896,10 @@ declare namespace Highcharts { * @param seriesOptions The series options, as documented under plotOptions.series and under the plotOptions for each series type. * @since 3.0.8 */ - addSeriesAsDrilldown(point: PointObject, seriesOptions: IndividualSeriesOptions): void; + addSeriesAsDrilldown( + point: PointObject, + seriesOptions: IndividualSeriesOptions + ): void; chartHeight?: number; chartWidth?: number; /** @@ -6898,7 +6973,10 @@ declare namespace Highcharts { * exported chart. Same as the exportChart params. * @since 2.0 */ - exportChartLocal(options: ExportingOptions, chartOptions: Options): void; + exportChartLocal( + options: ExportingOptions, + chartOptions: Options + ): void; /** * Get an axis, series or point by its id as given in the configuration options. * @param id The id of the axis, series or point to get. @@ -6975,7 +7053,11 @@ declare namespace Highcharts { * @param animation Defaults to true. When true, the resize will be animated with default animation options. * The animation can also be a configuration object with properties duration and easing. */ - setSize(width: number, height: number, animation?: boolean | Animation): void; + setSize( + width: number, + height: number, + animation?: boolean | Animation + ): void; /** * Set a new title or subtitle for the chart * @param title A configuration object for the new title as defined at #title. @@ -6983,7 +7065,11 @@ declare namespace Highcharts { * @param [boolean] redraw Whether to redraw the chart. Defaults to true. * @since 2.1.0 */ - setTitle(title: TitleOptions, subtitle?: SubtitleOptions, redraw?: boolean): void; + setTitle( + title: TitleOptions, + subtitle?: SubtitleOptions, + redraw?: boolean + ): void; /** * Dim the chart's plot area and show a loading label text. Options for the loading screen are defined at * options.loading. A custom text can be given as a parameter for loading. @@ -7015,7 +7101,12 @@ declare namespace Highcharts { * @param [(boolean | AnimationOptions)] animation Whether to apply animation, and optionally animation configuration. * @since 5.0.0 */ - update(options: Options, redraw?: boolean, oneToOne?: boolean, animation?: boolean | AnimationOptions): void; + update( + options: Options, + redraw?: boolean, + oneToOne?: boolean, + animation?: boolean | AnimationOptions + ): void; /** * This method is deprecated as of 2.0.1. Updating the chart position after a move operation is no longer necessary. * @since 1.2.5 @@ -7052,7 +7143,10 @@ declare namespace Highcharts { * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). * s a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. */ - new (options: Options, callback: (chart: ChartObject) => void): ChartObject; + new ( + options: Options, + callback: (chart: ChartObject) => void + ): ChartObject; /** * This is the constructor for creating a new chart object. * @param renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). @@ -7068,7 +7162,11 @@ declare namespace Highcharts { * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). * As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. */ - new (renderTo: string | HTMLElement, options: Options, callback: (chart: ChartObject) => void): ChartObject; + new ( + renderTo: string | HTMLElement, + options: Options, + callback: (chart: ChartObject) => void + ): ChartObject; } /** @@ -7121,7 +7219,7 @@ declare namespace Highcharts { * @return An object containing x, y, width and height values for the element. * @since 2.0 */ - getBBox(): { x: number; y: number; height: number; width: number; }; + getBBox(): { x: number; y: number; height: number; width: number }; /** * Apply an event handler to the element * @param eventType The event type to attach, for example 'click', 'mouseover', 'touch'. @@ -7160,7 +7258,14 @@ declare namespace Highcharts { * @param end The ending angle of the arc in radians, where 0 is to the right and -Math.PI/2 is up. * @since 2.0 */ - arc(centerX: number, centerY: number, outerRadius: number, innerRadius: number, start: number, end: number): ElementObject; + arc( + centerX: number, + centerY: number, + outerRadius: number, + innerRadius: number, + start: number, + end: number + ): ElementObject; /** * Draw circle on the renderer canvas. * @param centerX The x position of the circle's center in the SVG element. @@ -7200,7 +7305,13 @@ declare namespace Highcharts { * @param height The height of the image. * @since 2.0 */ - image(source: string, x: number, y: number, width: number, height: number): ElementObject; + image( + source: string, + x: number, + y: number, + width: number, + height: number + ): ElementObject; /** * Draw a label, which is an extended text element with support for border and background. Highcharts creates a g * element with a text and a path or rect inside, to make it behave somewhat like a HTML div. Border and background @@ -7218,7 +7329,17 @@ declare namespace Highcharts { * @param [string] className A class name for the g element surrounding the label. * @since 2.0 */ - label(str: string, x: number, y: number, shape?: string, anchorX?: number, anchorY?: number, useHTML?: boolean, baseline?: boolean, className?: string): ElementObject; + label( + str: string, + x: number, + y: number, + shape?: string, + anchorX?: number, + anchorY?: number, + useHTML?: boolean, + baseline?: boolean, + className?: string + ): ElementObject; /** * Add a path based on SVG's path commands. In SVG capable browsers all path commands are supported, but in VML only * a subset is supported: absolute moveTo (M), absolute lineTo (L), absolute curveTo (C) and close (Z). @@ -7234,7 +7355,13 @@ declare namespace Highcharts { * @param cornerRadius The corner radius of all the rectangle's corners. * @since 2.0 */ - rect(x: number, y: number, width: number, height: number, cornerRadius: number): ElementObject; + rect( + x: number, + y: number, + width: number, + height: number, + cornerRadius: number + ): ElementObject; /** * Draw text. The text can contain a subset of HTML, like spans and anchors and some basic text styling of these. * For more advanced features like border and background, use label instead. @@ -7262,7 +7389,11 @@ declare namespace Highcharts { } interface Renderer { - new (parentNode: HTMLElement, width: number, height: number): RendererObject; + new ( + parentNode: HTMLElement, + width: number, + height: number + ): RendererObject; } interface Static { @@ -7274,12 +7405,19 @@ declare namespace Highcharts { * As Highcharts.Chart, but without need for the new keyword. * @since 4.2.0 */ - chart(options: Options, callback?: (chart: ChartObject) => void): ChartObject; + chart( + options: Options, + callback?: (chart: ChartObject) => void + ): ChartObject; /** * As Highcharts.Chart, but without need for the new keyword. * @since 4.2.0 */ - chart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; + chart( + renderTo: string | HTMLElement, + options: Options, + callback?: (chart: ChartObject) => void + ): ChartObject; /** * An array containing the current chart objects in the page. A chart's position in the array is preserved * throughout the page's lifetime. When a chart is destroyed, the array item becomes undefined. @@ -7318,7 +7456,12 @@ declare namespace Highcharts { * @param decimalPoint The decimal point. Defaults to '.' or to the string specified globally in options.lang.decimalPoint. * @param thousandsSep The thousands separator. Defaults to ' ' or to the string specified globally in options.lang.thousandsSep. */ - numberFormat(value: number, decimals?: number, decimalPoint?: string, thousandsSep?: string): string; + numberFormat( + value: number, + decimals?: number, + decimalPoint?: string, + thousandsSep?: string + ): string; /** * Sets the options globally for all charts created after this has been called. Takes an options JavaScript object * structure as the argument. These options are merged with the default options and the result is returned. @@ -7343,7 +7486,11 @@ declare namespace Highcharts { * @param type The type of behavior you are extending. * @param cb The function that executes when the behavior occurs. */ - wrap(prototype: any, type: string, cb: (proceed: Function, ...args: any[]) => void): void; + wrap( + prototype: any, + type: string, + cb: (proceed: Function, ...args: any[]) => void + ): void; /** * Add an event listener. @@ -7356,9 +7503,11 @@ declare namespace Highcharts { * @param cb The function callback to execute when the event is fired. * @returns A callback function to remove the added event. */ - addEvent(element: HTMLElement | ElementObject | object, - type: string, - cb: (evt: Event) => void): () => void; + addEvent( + element: HTMLElement | ElementObject | object, + type: string, + cb: (evt: Event) => void + ): () => void; /** * Fire an event that was registered with @@ -7370,10 +7519,12 @@ declare namespace Highcharts { * @param eventArguments Custom event arguments that are passed on as an argument to the event handler. * @param defaultFunction The default function to execute if the other listeners haven't returned false. */ - fireEvent(element: HTMLElement | ElementObject | object, - type: string, - eventArguments?: any, - defaultFunction?: () => void): void; + fireEvent( + element: HTMLElement | ElementObject | object, + type: string, + eventArguments?: any, + defaultFunction?: () => void + ): void; distribute(array: any[], value: number): void; @@ -7443,7 +7594,11 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - slice(sliced?: boolean, redraw?: boolean, animation?: boolean | Animation): void; + slice( + sliced?: boolean, + redraw?: boolean, + animation?: boolean | Animation + ): void; /** * The total of a stack for stacked series, or pie in pie charts. */ @@ -7459,7 +7614,11 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - update(options: number | [number, number] | DataPoint, redraw?: boolean, animation?: boolean | Animation): void; + update( + options: number | [number, number] | DataPoint, + redraw?: boolean, + animation?: boolean | Animation + ): void; /** * The x value for the point. * @since 1.2.0 @@ -7500,7 +7659,12 @@ declare namespace Highcharts { * Use this option for live charts monitoring a value over time. * @since 1.2.0 */ - addPoint(options: number | [number, number] | DataPoint, redraw?: boolean, shift?: boolean, animation?: boolean | Animation): void; + addPoint( + options: number | [number, number] | DataPoint, + redraw?: boolean, + shift?: boolean, + animation?: boolean | Animation + ): void; /** * Read only. The chart that the series belongs to. * @since 1.2.0 @@ -7544,7 +7708,11 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 4.1.0 */ - removePoint(index: number, redraw?: boolean, animation?: boolean | Animation): void; + removePoint( + index: number, + redraw?: boolean, + animation?: boolean | Animation + ): void; /** * Select or unselect the series. This means its selected property is set,the checkbox in the legend is toggled and * when selected, the series is returned in the chart.getSelectedSeries() method. @@ -7569,7 +7737,12 @@ declare namespace Highcharts { * This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. * @since 1.2.0 */ - setData(data: number[] | number[][] | DataPoint[], redraw?: boolean, animation?: boolean | Animation, updatePoints?: boolean): void; + setData( + data: number[] | number[][] | DataPoint[], + redraw?: boolean, + animation?: boolean | Animation, + updatePoints?: boolean + ): void; /** * A utility function to show or hide the series with an optional redraw. * @param [boolean] visible - Whether to show or hide the series. If undefined, the visibility is toggled. @@ -7656,7 +7829,10 @@ declare global { * @param callback Callback function used to manipulate the constructed chart instance * @return current {JQuery} selector the current JQuery selector */ - highcharts(options: Highcharts.Options, callback: (chart: Highcharts.ChartObject) => void): JQuery; + highcharts( + options: Highcharts.Options, + callback: (chart: Highcharts.ChartObject) => void + ): JQuery; } } From 2083505b395c2742083e085386ea96a503eb70af Mon Sep 17 00:00:00 2001 From: juwar Date: Mon, 22 Oct 2018 09:31:35 -0700 Subject: [PATCH 0048/1121] Revert the formatting --- types/highcharts/index.d.ts | 332 +++++++++--------------------------- 1 file changed, 78 insertions(+), 254 deletions(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 7da3ac752d..644dc1a169 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -292,7 +292,7 @@ declare namespace Highcharts { * @default null * @since 2.3 */ - innerRadius?: number | string | null; + innerRadius?: number | string | null; /** * Text labels for the plot bands */ @@ -494,12 +494,12 @@ declare namespace Highcharts { shadow?: | boolean | { - color?: string | Gradient; - offsetX?: number; - offsetY?: number; - opacity?: number; - width?: number; - }; + color?: string | Gradient; + offsetX?: number; + offsetY?: number; + opacity?: number; + width?: number; + }; /** * The name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object. * @default "callout" @@ -1294,7 +1294,7 @@ declare namespace Highcharts { * Use this in cases where a linear gradient between a minColor and maxColor is not sufficient. * The stops is an array of tuples, where the first item is a float between 0 and 1 assigning the relative position in the gradient, and the second item is the color. */ - stops?: Array>; + stops?: Array>; /** * The amount of ticks to draw on the axis. This opens up for aligning the ticks of multiple charts or panes within * a chart. This option overrides the tickPixelInterval option. @@ -1859,9 +1859,7 @@ declare namespace Highcharts { interface Gradient { linearGradient?: LinearGradient | number[]; radialGradient?: { - cx: number; - cy: number; - r: number; + cx: number; cy: number; r: number; }; stops?: any[][]; /** @@ -2017,7 +2015,7 @@ declare namespace Highcharts { /** * The button stroke width */ - "stroke-width"?: number; + 'stroke-width'?: number; /** * The border radius */ @@ -3418,7 +3416,7 @@ declare namespace Highcharts { * @default ['50%', '50%'] * @since 2.3.0 */ - center?: Array; + center?: Array; /** * The end angle of the polar X axis or gauge value axis, given in degrees where 0 is north. * @default startAngle + 360 @@ -4035,7 +4033,7 @@ declare namespace Highcharts { halo?: boolean | Halo; } - interface PieStates extends BarStates, LineStates {} + interface PieStates extends BarStates, LineStates { } interface AreaZone { /** @@ -4684,9 +4682,11 @@ declare namespace Highcharts { dataLabels?: RangeDataLabels; } - interface AreaSplineChart extends AreaChart {} + interface AreaSplineChart extends AreaChart { + } - interface AreaSplineRangeChart extends AreaRangeChart {} + interface AreaSplineRangeChart extends AreaRangeChart { + } interface BarChart extends SeriesChart { /** @@ -4925,7 +4925,8 @@ declare namespace Highcharts { zThreshold?: number; } - interface ColumnChart extends BarChart {} + interface ColumnChart extends BarChart { + } /** * The column range is a cartesian series type with higher and lower Y values along an X axis. Requires @@ -5873,14 +5874,7 @@ declare namespace Highcharts { * [3, 7, 8] * */ - data?: Array< - | number - | [number, number] - | [string, number] - | [string, number, number] - | [number, number, number] - | DataPoint - >; + data?: Array; /** * A description of the series to add to the screen reader information about the series. * @since 5.0.0 @@ -5948,73 +5942,31 @@ declare namespace Highcharts { zIndex?: number; } - interface SeriesOptions extends IndividualSeriesOptions, SeriesChart {} + interface SeriesOptions extends IndividualSeriesOptions, SeriesChart { } - interface AreaChartSeriesOptions - extends IndividualSeriesOptions, - AreaChart {} - interface AreaRangeChartSeriesOptions - extends IndividualSeriesOptions, - AreaRangeChart {} - interface AreaSplineChartSeriesOptions - extends IndividualSeriesOptions, - AreaSplineChart {} - interface AreaSplineRangeChartSeriesOptions - extends IndividualSeriesOptions, - AreaSplineRangeChart {} - interface BarChartSeriesOptions extends IndividualSeriesOptions, BarChart {} - interface BoxPlotChartSeriesOptions - extends IndividualSeriesOptions, - BoxPlotChart {} - interface BubbleChartSeriesOptions - extends IndividualSeriesOptions, - BubbleChart {} - interface ColumnChartSeriesOptions - extends IndividualSeriesOptions, - ColumnChart {} - interface ColumnRangeChartSeriesOptions - extends IndividualSeriesOptions, - ColumnRangeChart {} - interface ErrorBarChartSeriesOptions - extends IndividualSeriesOptions, - ErrorBarChart {} - interface FunnelChartSeriesOptions - extends IndividualSeriesOptions, - FunnelChart {} - interface GaugeChartSeriesOptions - extends IndividualSeriesOptions, - GaugeChart {} - interface HeatMapSeriesOptions - extends IndividualSeriesOptions, - HeatMapChart {} - interface LineChartSeriesOptions - extends IndividualSeriesOptions, - LineChart {} - interface PieChartSeriesOptions extends IndividualSeriesOptions, PieChart {} - interface PolygonChartSeriesOptions - extends IndividualSeriesOptions, - PolygonChart {} - interface PyramidChartSeriesOptions - extends IndividualSeriesOptions, - PyramidChart {} - interface ScatterChartSeriesOptions - extends IndividualSeriesOptions, - ScatterChart {} - interface SolidGaugeChartSeriesOptions - extends IndividualSeriesOptions, - SolidGaugeChart {} - interface SplineChartSeriesOptions - extends IndividualSeriesOptions, - SplineChart {} - interface TreeMapChartSeriesOptions - extends IndividualSeriesOptions, - TreeMapChart {} - interface WaterFallChartSeriesOptions - extends IndividualSeriesOptions, - WaterFallChart {} - interface WordCloudChartSeriesOptions - extends IndividualSeriesOptions, - WordCloudChart {} + interface AreaChartSeriesOptions extends IndividualSeriesOptions, AreaChart { } + interface AreaRangeChartSeriesOptions extends IndividualSeriesOptions, AreaRangeChart { } + interface AreaSplineChartSeriesOptions extends IndividualSeriesOptions, AreaSplineChart { } + interface AreaSplineRangeChartSeriesOptions extends IndividualSeriesOptions, AreaSplineRangeChart { } + interface BarChartSeriesOptions extends IndividualSeriesOptions, BarChart { } + interface BoxPlotChartSeriesOptions extends IndividualSeriesOptions, BoxPlotChart { } + interface BubbleChartSeriesOptions extends IndividualSeriesOptions, BubbleChart { } + interface ColumnChartSeriesOptions extends IndividualSeriesOptions, ColumnChart { } + interface ColumnRangeChartSeriesOptions extends IndividualSeriesOptions, ColumnRangeChart { } + interface ErrorBarChartSeriesOptions extends IndividualSeriesOptions, ErrorBarChart { } + interface FunnelChartSeriesOptions extends IndividualSeriesOptions, FunnelChart { } + interface GaugeChartSeriesOptions extends IndividualSeriesOptions, GaugeChart { } + interface HeatMapSeriesOptions extends IndividualSeriesOptions, HeatMapChart { } + interface LineChartSeriesOptions extends IndividualSeriesOptions, LineChart { } + interface PieChartSeriesOptions extends IndividualSeriesOptions, PieChart { } + interface PolygonChartSeriesOptions extends IndividualSeriesOptions, PolygonChart { } + interface PyramidChartSeriesOptions extends IndividualSeriesOptions, PyramidChart { } + interface ScatterChartSeriesOptions extends IndividualSeriesOptions, ScatterChart { } + interface SolidGaugeChartSeriesOptions extends IndividualSeriesOptions, SolidGaugeChart { } + interface SplineChartSeriesOptions extends IndividualSeriesOptions, SplineChart { } + interface TreeMapChartSeriesOptions extends IndividualSeriesOptions, TreeMapChart { } + interface WaterFallChartSeriesOptions extends IndividualSeriesOptions, WaterFallChart { } + interface WordCloudChartSeriesOptions extends IndividualSeriesOptions, WordCloudChart { } interface DataPoint { /** @@ -6369,12 +6321,7 @@ declare namespace Highcharts { * * @default null */ - crosshairs?: - | boolean - | [boolean, boolean] - | CrosshairObject - | [CrosshairObject, CrosshairObject] - | null; + crosshairs?: boolean | [boolean, boolean] | CrosshairObject | [CrosshairObject, CrosshairObject] | null; /** * Enable or disable the tooltip. * @default true @@ -6433,11 +6380,7 @@ declare namespace Highcharts { * The return should be an object containing x and y values, for example { x: 100, y: 100 }. * @since 2.2.4 */ - positioner?( - labelWidth: number, - labelHeight: number, - point: PlotPoint - ): { x: number; y: number }; + positioner?(labelWidth: number, labelHeight: number, point: PlotPoint): { x: number; y: number; }; /** * Whether to apply a drop shadow to the tooltip. * @default true @@ -6808,13 +6751,7 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - setExtremes( - min?: number, - max?: number, - redraw?: boolean, - animation?: boolean | Animation, - eventArguments?: any - ): void; + setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | Animation, eventArguments?: any): void; /** * Update the title of the axis after render time. * @param title The new title options on the same format as given in xAxis.title. @@ -6863,12 +6800,7 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 3.0 */ - addAxis( - options: AxisOptions, - isX?: boolean, - redraw?: boolean, - animation?: boolean | Animation - ): AxisObject; + addAxis(options: AxisOptions, isX?: boolean, redraw?: boolean, animation?: boolean | Animation): AxisObject; /** * Set a new credits label for the chart. * @param A configuration object for the credits as defined at credits. @@ -6883,11 +6815,7 @@ declare namespace Highcharts { * @param [boolean] redraw * @since 1.2.0 */ - addSeries( - options: T, - redraw?: boolean, - animation?: boolean | Animation - ): SeriesObject; + addSeries(options: T, redraw?: boolean, animation?: boolean | Animation): SeriesObject; /** * Add a series to the chart as drilldown from a specific point in the parent series. This method is used for async * drilldown, when clicking a point in a series should result in loading and displaying a more high-resolution @@ -6896,10 +6824,7 @@ declare namespace Highcharts { * @param seriesOptions The series options, as documented under plotOptions.series and under the plotOptions for each series type. * @since 3.0.8 */ - addSeriesAsDrilldown( - point: PointObject, - seriesOptions: IndividualSeriesOptions - ): void; + addSeriesAsDrilldown(point: PointObject, seriesOptions: IndividualSeriesOptions): void; chartHeight?: number; chartWidth?: number; /** @@ -6973,10 +6898,7 @@ declare namespace Highcharts { * exported chart. Same as the exportChart params. * @since 2.0 */ - exportChartLocal( - options: ExportingOptions, - chartOptions: Options - ): void; + exportChartLocal(options: ExportingOptions, chartOptions: Options): void; /** * Get an axis, series or point by its id as given in the configuration options. * @param id The id of the axis, series or point to get. @@ -7053,11 +6975,7 @@ declare namespace Highcharts { * @param animation Defaults to true. When true, the resize will be animated with default animation options. * The animation can also be a configuration object with properties duration and easing. */ - setSize( - width: number, - height: number, - animation?: boolean | Animation - ): void; + setSize(width: number, height: number, animation?: boolean | Animation): void; /** * Set a new title or subtitle for the chart * @param title A configuration object for the new title as defined at #title. @@ -7065,11 +6983,7 @@ declare namespace Highcharts { * @param [boolean] redraw Whether to redraw the chart. Defaults to true. * @since 2.1.0 */ - setTitle( - title: TitleOptions, - subtitle?: SubtitleOptions, - redraw?: boolean - ): void; + setTitle(title: TitleOptions, subtitle?: SubtitleOptions, redraw?: boolean): void; /** * Dim the chart's plot area and show a loading label text. Options for the loading screen are defined at * options.loading. A custom text can be given as a parameter for loading. @@ -7101,12 +7015,7 @@ declare namespace Highcharts { * @param [(boolean | AnimationOptions)] animation Whether to apply animation, and optionally animation configuration. * @since 5.0.0 */ - update( - options: Options, - redraw?: boolean, - oneToOne?: boolean, - animation?: boolean | AnimationOptions - ): void; + update(options: Options, redraw?: boolean, oneToOne?: boolean, animation?: boolean | AnimationOptions): void; /** * This method is deprecated as of 2.0.1. Updating the chart position after a move operation is no longer necessary. * @since 1.2.5 @@ -7143,10 +7052,7 @@ declare namespace Highcharts { * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). * s a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. */ - new ( - options: Options, - callback: (chart: ChartObject) => void - ): ChartObject; + new (options: Options, callback: (chart: ChartObject) => void): ChartObject; /** * This is the constructor for creating a new chart object. * @param renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). @@ -7162,11 +7068,7 @@ declare namespace Highcharts { * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). * As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. */ - new ( - renderTo: string | HTMLElement, - options: Options, - callback: (chart: ChartObject) => void - ): ChartObject; + new (renderTo: string | HTMLElement, options: Options, callback: (chart: ChartObject) => void): ChartObject; } /** @@ -7219,7 +7121,7 @@ declare namespace Highcharts { * @return An object containing x, y, width and height values for the element. * @since 2.0 */ - getBBox(): { x: number; y: number; height: number; width: number }; + getBBox(): { x: number; y: number; height: number; width: number; }; /** * Apply an event handler to the element * @param eventType The event type to attach, for example 'click', 'mouseover', 'touch'. @@ -7258,14 +7160,7 @@ declare namespace Highcharts { * @param end The ending angle of the arc in radians, where 0 is to the right and -Math.PI/2 is up. * @since 2.0 */ - arc( - centerX: number, - centerY: number, - outerRadius: number, - innerRadius: number, - start: number, - end: number - ): ElementObject; + arc(centerX: number, centerY: number, outerRadius: number, innerRadius: number, start: number, end: number): ElementObject; /** * Draw circle on the renderer canvas. * @param centerX The x position of the circle's center in the SVG element. @@ -7305,13 +7200,7 @@ declare namespace Highcharts { * @param height The height of the image. * @since 2.0 */ - image( - source: string, - x: number, - y: number, - width: number, - height: number - ): ElementObject; + image(source: string, x: number, y: number, width: number, height: number): ElementObject; /** * Draw a label, which is an extended text element with support for border and background. Highcharts creates a g * element with a text and a path or rect inside, to make it behave somewhat like a HTML div. Border and background @@ -7329,17 +7218,7 @@ declare namespace Highcharts { * @param [string] className A class name for the g element surrounding the label. * @since 2.0 */ - label( - str: string, - x: number, - y: number, - shape?: string, - anchorX?: number, - anchorY?: number, - useHTML?: boolean, - baseline?: boolean, - className?: string - ): ElementObject; + label(str: string, x: number, y: number, shape?: string, anchorX?: number, anchorY?: number, useHTML?: boolean, baseline?: boolean, className?: string): ElementObject; /** * Add a path based on SVG's path commands. In SVG capable browsers all path commands are supported, but in VML only * a subset is supported: absolute moveTo (M), absolute lineTo (L), absolute curveTo (C) and close (Z). @@ -7355,13 +7234,7 @@ declare namespace Highcharts { * @param cornerRadius The corner radius of all the rectangle's corners. * @since 2.0 */ - rect( - x: number, - y: number, - width: number, - height: number, - cornerRadius: number - ): ElementObject; + rect(x: number, y: number, width: number, height: number, cornerRadius: number): ElementObject; /** * Draw text. The text can contain a subset of HTML, like spans and anchors and some basic text styling of these. * For more advanced features like border and background, use label instead. @@ -7389,11 +7262,7 @@ declare namespace Highcharts { } interface Renderer { - new ( - parentNode: HTMLElement, - width: number, - height: number - ): RendererObject; + new (parentNode: HTMLElement, width: number, height: number): RendererObject; } interface Static { @@ -7405,19 +7274,12 @@ declare namespace Highcharts { * As Highcharts.Chart, but without need for the new keyword. * @since 4.2.0 */ - chart( - options: Options, - callback?: (chart: ChartObject) => void - ): ChartObject; + chart(options: Options, callback?: (chart: ChartObject) => void): ChartObject; /** * As Highcharts.Chart, but without need for the new keyword. * @since 4.2.0 */ - chart( - renderTo: string | HTMLElement, - options: Options, - callback?: (chart: ChartObject) => void - ): ChartObject; + chart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; /** * An array containing the current chart objects in the page. A chart's position in the array is preserved * throughout the page's lifetime. When a chart is destroyed, the array item becomes undefined. @@ -7456,12 +7318,7 @@ declare namespace Highcharts { * @param decimalPoint The decimal point. Defaults to '.' or to the string specified globally in options.lang.decimalPoint. * @param thousandsSep The thousands separator. Defaults to ' ' or to the string specified globally in options.lang.thousandsSep. */ - numberFormat( - value: number, - decimals?: number, - decimalPoint?: string, - thousandsSep?: string - ): string; + numberFormat(value: number, decimals?: number, decimalPoint?: string, thousandsSep?: string): string; /** * Sets the options globally for all charts created after this has been called. Takes an options JavaScript object * structure as the argument. These options are merged with the default options and the result is returned. @@ -7486,11 +7343,7 @@ declare namespace Highcharts { * @param type The type of behavior you are extending. * @param cb The function that executes when the behavior occurs. */ - wrap( - prototype: any, - type: string, - cb: (proceed: Function, ...args: any[]) => void - ): void; + wrap(prototype: any, type: string, cb: (proceed: Function, ...args: any[]) => void): void; /** * Add an event listener. @@ -7503,11 +7356,9 @@ declare namespace Highcharts { * @param cb The function callback to execute when the event is fired. * @returns A callback function to remove the added event. */ - addEvent( - element: HTMLElement | ElementObject | object, - type: string, - cb: (evt: Event) => void - ): () => void; + addEvent(element: HTMLElement | ElementObject | object, + type: string, + cb: (evt: Event) => void): () => void; /** * Fire an event that was registered with @@ -7519,12 +7370,10 @@ declare namespace Highcharts { * @param eventArguments Custom event arguments that are passed on as an argument to the event handler. * @param defaultFunction The default function to execute if the other listeners haven't returned false. */ - fireEvent( - element: HTMLElement | ElementObject | object, - type: string, - eventArguments?: any, - defaultFunction?: () => void - ): void; + fireEvent(element: HTMLElement | ElementObject | object, + type: string, + eventArguments?: any, + defaultFunction?: () => void): void; distribute(array: any[], value: number): void; @@ -7594,11 +7443,7 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - slice( - sliced?: boolean, - redraw?: boolean, - animation?: boolean | Animation - ): void; + slice(sliced?: boolean, redraw?: boolean, animation?: boolean | Animation): void; /** * The total of a stack for stacked series, or pie in pie charts. */ @@ -7614,11 +7459,7 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ - update( - options: number | [number, number] | DataPoint, - redraw?: boolean, - animation?: boolean | Animation - ): void; + update(options: number | [number, number] | DataPoint, redraw?: boolean, animation?: boolean | Animation): void; /** * The x value for the point. * @since 1.2.0 @@ -7659,12 +7500,7 @@ declare namespace Highcharts { * Use this option for live charts monitoring a value over time. * @since 1.2.0 */ - addPoint( - options: number | [number, number] | DataPoint, - redraw?: boolean, - shift?: boolean, - animation?: boolean | Animation - ): void; + addPoint(options: number | [number, number] | DataPoint, redraw?: boolean, shift?: boolean, animation?: boolean | Animation): void; /** * Read only. The chart that the series belongs to. * @since 1.2.0 @@ -7708,11 +7544,7 @@ declare namespace Highcharts { * The animation can also be a configuration object with properties duration and easing. * @since 4.1.0 */ - removePoint( - index: number, - redraw?: boolean, - animation?: boolean | Animation - ): void; + removePoint(index: number, redraw?: boolean, animation?: boolean | Animation): void; /** * Select or unselect the series. This means its selected property is set,the checkbox in the legend is toggled and * when selected, the series is returned in the chart.getSelectedSeries() method. @@ -7737,12 +7569,7 @@ declare namespace Highcharts { * This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. * @since 1.2.0 */ - setData( - data: number[] | number[][] | DataPoint[], - redraw?: boolean, - animation?: boolean | Animation, - updatePoints?: boolean - ): void; + setData(data: number[] | number[][] | DataPoint[], redraw?: boolean, animation?: boolean | Animation, updatePoints?: boolean): void; /** * A utility function to show or hide the series with an optional redraw. * @param [boolean] visible - Whether to show or hide the series. If undefined, the visibility is toggled. @@ -7829,10 +7656,7 @@ declare global { * @param callback Callback function used to manipulate the constructed chart instance * @return current {JQuery} selector the current JQuery selector */ - highcharts( - options: Highcharts.Options, - callback: (chart: Highcharts.ChartObject) => void - ): JQuery; + highcharts(options: Highcharts.Options, callback: (chart: Highcharts.ChartObject) => void): JQuery; } } From ace7dbcd8b4b921b0cf81197b265e973eb34fd21 Mon Sep 17 00:00:00 2001 From: Timur Manyanov Date: Mon, 22 Oct 2018 19:15:39 +0200 Subject: [PATCH 0049/1121] Add makeup-keyboard-trap definitions --- types/makeup-keyboard-trap/index.d.ts | 11 +++++++++ .../makeup-keyboard-trap-tests.ts | 7 ++++++ types/makeup-keyboard-trap/tsconfig.json | 24 +++++++++++++++++++ types/makeup-keyboard-trap/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 types/makeup-keyboard-trap/index.d.ts create mode 100644 types/makeup-keyboard-trap/makeup-keyboard-trap-tests.ts create mode 100644 types/makeup-keyboard-trap/tsconfig.json create mode 100644 types/makeup-keyboard-trap/tslint.json diff --git a/types/makeup-keyboard-trap/index.d.ts b/types/makeup-keyboard-trap/index.d.ts new file mode 100644 index 0000000000..4645d57e2c --- /dev/null +++ b/types/makeup-keyboard-trap/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for makeup-keyboard-trap 0.1 +// Project: https://github.com/makeup-js/makeup-keyboard-trap#readme +// Definitions by: Timur Manyanov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +export function refresh(): any; + +export function trap(el: any): any; + +export function untrap(): any; diff --git a/types/makeup-keyboard-trap/makeup-keyboard-trap-tests.ts b/types/makeup-keyboard-trap/makeup-keyboard-trap-tests.ts new file mode 100644 index 0000000000..0f7687d750 --- /dev/null +++ b/types/makeup-keyboard-trap/makeup-keyboard-trap-tests.ts @@ -0,0 +1,7 @@ +import { trap, untrap } from 'makeup-keyboard-trap'; + +const widgetEl: HTMLElement | null = document.querySelector('.expander'); + +trap(widgetEl); + +untrap(); diff --git a/types/makeup-keyboard-trap/tsconfig.json b/types/makeup-keyboard-trap/tsconfig.json new file mode 100644 index 0000000000..0e4c00274f --- /dev/null +++ b/types/makeup-keyboard-trap/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "makeup-keyboard-trap-tests.ts" + ] +} diff --git a/types/makeup-keyboard-trap/tslint.json b/types/makeup-keyboard-trap/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/makeup-keyboard-trap/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 38983e317ac39a234d6bc4106f7f4d0767211800 Mon Sep 17 00:00:00 2001 From: AzSiAz Date: Mon, 22 Oct 2018 19:58:14 +0200 Subject: [PATCH 0050/1121] Add overloading to `get` method --- types/cheerio/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index cb8031705e..7f76146257 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Cheerio v0.22.0 // Project: https://github.com/cheeriojs/cheerio -// Definitions by: Bret Little , VILIC VANE , Wayne Maurer , Umar Nizamani , LiJinyao , Chennakrishna +// Definitions by: Bret Little , VILIC VANE , Wayne Maurer , Umar Nizamani , LiJinyao , Chennakrishna , AzSiAz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface Cheerio { @@ -112,8 +112,10 @@ interface Cheerio { eq(index: number): Cheerio; get(): string[]; + get(): T[]; get(): CheerioElement[]; get(index: number): CheerioElement; + get(index: number): T; index(): number; index(selector: string): number; From a8b6dfd99e9637403c2204d0f2fe8e53f9c8eed3 Mon Sep 17 00:00:00 2001 From: AzSiAz Date: Mon, 22 Oct 2018 20:10:40 +0200 Subject: [PATCH 0051/1121] Revert "Add overloading to `get` method" This reverts commit 38983e317ac39a234d6bc4106f7f4d0767211800. --- types/cheerio/index.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index 7f76146257..5f8b89fe60 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -112,10 +112,8 @@ interface Cheerio { eq(index: number): Cheerio; get(): string[]; - get(): T[]; get(): CheerioElement[]; get(index: number): CheerioElement; - get(index: number): T; index(): number; index(selector: string): number; From 023af83ed4d02ef61234532448ac49d8c27dad5b Mon Sep 17 00:00:00 2001 From: AzSiAz Date: Mon, 22 Oct 2018 20:11:22 +0200 Subject: [PATCH 0052/1121] Add correct overloading to `get` method --- types/cheerio/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/cheerio/index.d.ts b/types/cheerio/index.d.ts index 5f8b89fe60..b04e0f009d 100644 --- a/types/cheerio/index.d.ts +++ b/types/cheerio/index.d.ts @@ -111,6 +111,7 @@ interface Cheerio { eq(index: number): Cheerio; + get(): any[] get(): string[]; get(): CheerioElement[]; get(index: number): CheerioElement; From f3cc5edb390104313d4365a311a60679a18719b4 Mon Sep 17 00:00:00 2001 From: Timur Manyanov Date: Tue, 23 Oct 2018 09:10:00 +0200 Subject: [PATCH 0053/1121] Add makeup-prevent-scroll-keys definitions --- types/makeup-prevent-scroll-keys/index.d.ts | 9 +++++++ .../makeup-prevent-scroll-keys-tests.ts | 9 +++++++ .../makeup-prevent-scroll-keys/tsconfig.json | 24 +++++++++++++++++++ types/makeup-prevent-scroll-keys/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 types/makeup-prevent-scroll-keys/index.d.ts create mode 100644 types/makeup-prevent-scroll-keys/makeup-prevent-scroll-keys-tests.ts create mode 100644 types/makeup-prevent-scroll-keys/tsconfig.json create mode 100644 types/makeup-prevent-scroll-keys/tslint.json diff --git a/types/makeup-prevent-scroll-keys/index.d.ts b/types/makeup-prevent-scroll-keys/index.d.ts new file mode 100644 index 0000000000..bb59ece615 --- /dev/null +++ b/types/makeup-prevent-scroll-keys/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for makeup-prevent-scroll-keys 0.0 +// Project: https://github.com/makeup-js/makeup-prevent-scroll-keys#readme +// Definitions by: Timur Manyanov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +export function add(el: any): void; + +export function remove(el: any): void; diff --git a/types/makeup-prevent-scroll-keys/makeup-prevent-scroll-keys-tests.ts b/types/makeup-prevent-scroll-keys/makeup-prevent-scroll-keys-tests.ts new file mode 100644 index 0000000000..c889c6299a --- /dev/null +++ b/types/makeup-prevent-scroll-keys/makeup-prevent-scroll-keys-tests.ts @@ -0,0 +1,9 @@ +import * as scrollKeyPreventer from 'makeup-prevent-scroll-keys'; + +const widgetEl: HTMLElement | null = document.querySelector('.widget'); + +if (widgetEl) { + scrollKeyPreventer.add(widgetEl); + + scrollKeyPreventer.remove(widgetEl); +} diff --git a/types/makeup-prevent-scroll-keys/tsconfig.json b/types/makeup-prevent-scroll-keys/tsconfig.json new file mode 100644 index 0000000000..d48ada0be6 --- /dev/null +++ b/types/makeup-prevent-scroll-keys/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "makeup-prevent-scroll-keys-tests.ts" + ] +} diff --git a/types/makeup-prevent-scroll-keys/tslint.json b/types/makeup-prevent-scroll-keys/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/makeup-prevent-scroll-keys/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 8b48f3872651970d606d0df86fe35b8bae6851d9 Mon Sep 17 00:00:00 2001 From: "michael.geiss" Date: Tue, 23 Oct 2018 10:59:05 +0200 Subject: [PATCH 0054/1121] fix chai-jquery added enabled --- types/chai-jquery/chai-jquery-tests.ts | 4 ++++ types/chai-jquery/index.d.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/types/chai-jquery/chai-jquery-tests.ts b/types/chai-jquery/chai-jquery-tests.ts index 894acf9ca5..bd798be847 100644 --- a/types/chai-jquery/chai-jquery-tests.ts +++ b/types/chai-jquery/chai-jquery-tests.ts @@ -67,6 +67,10 @@ function test_disabled() { expect($('#foo')).to.be.disabled; } +function test_enabled() { + expect($('#foo')).to.be.enabled; +} + function test_empty() { $('.empty').should.be.empty; expect($('body')).not.to.be.empty; diff --git a/types/chai-jquery/index.d.ts b/types/chai-jquery/index.d.ts index bd6826ca08..c2827d2e05 100644 --- a/types/chai-jquery/index.d.ts +++ b/types/chai-jquery/index.d.ts @@ -25,6 +25,7 @@ declare namespace Chai { selected(): Assertion; checked(): Assertion; disabled(): Assertion; + enabled(): Assertion; (selector: string): Assertion; } From 639b07d60dc248e05604857f6ef09238a45a79a4 Mon Sep 17 00:00:00 2001 From: Greg Jednaszewski Date: Tue, 23 Oct 2018 10:58:19 -0400 Subject: [PATCH 0055/1121] Add glue v4 typings --- types/glue/v4/glue-tests.ts | 34 ++++++++++++++++++++++++++++++++++ types/glue/v4/index.d.ts | 31 +++++++++++++++++++++++++++++++ types/glue/v4/tsconfig.json | 29 +++++++++++++++++++++++++++++ types/glue/v4/tslint.json | 3 +++ 4 files changed, 97 insertions(+) create mode 100644 types/glue/v4/glue-tests.ts create mode 100644 types/glue/v4/index.d.ts create mode 100644 types/glue/v4/tsconfig.json create mode 100644 types/glue/v4/tslint.json diff --git a/types/glue/v4/glue-tests.ts b/types/glue/v4/glue-tests.ts new file mode 100644 index 0000000000..5b0b3ad986 --- /dev/null +++ b/types/glue/v4/glue-tests.ts @@ -0,0 +1,34 @@ +import * as glue from "glue"; +import * as hapi from "hapi"; + +const serverOptions: hapi.ServerOptions = { + debug: false +}; + +const serverConnectionOptions: hapi.ServerConnectionOptions = { + port: 3000 +}; + +const manifest: glue.Manifest = { + server: serverOptions, + connections: [ serverConnectionOptions ], + registrations: [ + { + plugin: "./test.js", + }, + { + plugin: { + register: "test", + options: { + foo: "bar" + } + } + } + ], +}; + +const options: glue.Options = { + relativeTo: `${__dirname}/modules` +}; + +glue.compose(manifest, options); diff --git a/types/glue/v4/index.d.ts b/types/glue/v4/index.d.ts new file mode 100644 index 0000000000..c6f5a14679 --- /dev/null +++ b/types/glue/v4/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for glue 4.0 +// Project: https://github.com/hapijs/glue +// Definitions by: Greg Jednaszewski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Server, ServerConnectionOptions, ServerOptions } from "hapi"; + +export interface Options { + relativeTo: string; + preConnections?: (Server: Server, next: (err: any) => void) => void; + preRegister?: (Server: Server, next: (err: any) => void) => void; +} + +export interface Plugin { + plugin: string | { + register: string; + options?: any; + }; + options?: any; +} + +export interface Manifest { + server: ServerOptions; + connections: ServerConnectionOptions[]; + registrations?: Plugin[]; +} + +export function compose(manifest: Manifest, + options?: Options, + callback?: (err?: any, server?: Server) => void): Promise; diff --git a/types/glue/v4/tsconfig.json b/types/glue/v4/tsconfig.json new file mode 100644 index 0000000000..ead9b81629 --- /dev/null +++ b/types/glue/v4/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "boom": [ "boom/v4" ], + "catbox": [ "catbox/v7" ], + "hapi": [ "hapi/v16" ], + "glue": [ "glue/v4" ] + } + }, + "files": [ + "index.d.ts", + "glue-tests.ts" + ] +} diff --git a/types/glue/v4/tslint.json b/types/glue/v4/tslint.json new file mode 100644 index 0000000000..30a1bdde2e --- /dev/null +++ b/types/glue/v4/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file From 2b602f8da3e7b09206d01703c233c24c288a09be Mon Sep 17 00:00:00 2001 From: Greg Jednaszewski Date: Tue, 23 Oct 2018 10:58:19 -0400 Subject: [PATCH 0056/1121] Add glue v4 typings --- types/glue/v4/glue-tests.ts | 69 +++++++++++++++++++++++++++++++++++++ types/glue/v4/index.d.ts | 31 +++++++++++++++++ types/glue/v4/tsconfig.json | 29 ++++++++++++++++ types/glue/v4/tslint.json | 3 ++ 4 files changed, 132 insertions(+) create mode 100644 types/glue/v4/glue-tests.ts create mode 100644 types/glue/v4/index.d.ts create mode 100644 types/glue/v4/tsconfig.json create mode 100644 types/glue/v4/tslint.json diff --git a/types/glue/v4/glue-tests.ts b/types/glue/v4/glue-tests.ts new file mode 100644 index 0000000000..1b67554725 --- /dev/null +++ b/types/glue/v4/glue-tests.ts @@ -0,0 +1,69 @@ +import * as glue from "glue"; +import * as hapi from "hapi"; + +const manifest: glue.Manifest = { + server: { + debug: false, + }, + connections: [ + { + port: 8000, + labels: ['web'] + }, + { + port: 8001, + labels: ['admin'] + } + ], + registrations: [ + { + plugin: { + register: './assets', + options: { + uglify: true + } + } + }, + { + plugin: './ui-user', + options: { + select: ['web'] + } + }, + { + plugin: { + register: './ui-admin', + options: { + sessiontime: 500 + } + }, + options: { + select: ['admin'], + routes: { + prefix: '/admin' + } + } + }, + { + plugin: { + register: require('./awesome-plugin.js'), + options: { + whyNot: true + } + } + }, + ] +}; + +const options: glue.Options = { + relativeTo: `${__dirname}/modules` +}; + +glue.compose(manifest, options, (err, server) => { + if (err) { + throw err; + } + server.start(() => { + console.log('hapi days!'); + }); +}); diff --git a/types/glue/v4/index.d.ts b/types/glue/v4/index.d.ts new file mode 100644 index 0000000000..c6f5a14679 --- /dev/null +++ b/types/glue/v4/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for glue 4.0 +// Project: https://github.com/hapijs/glue +// Definitions by: Greg Jednaszewski +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Server, ServerConnectionOptions, ServerOptions } from "hapi"; + +export interface Options { + relativeTo: string; + preConnections?: (Server: Server, next: (err: any) => void) => void; + preRegister?: (Server: Server, next: (err: any) => void) => void; +} + +export interface Plugin { + plugin: string | { + register: string; + options?: any; + }; + options?: any; +} + +export interface Manifest { + server: ServerOptions; + connections: ServerConnectionOptions[]; + registrations?: Plugin[]; +} + +export function compose(manifest: Manifest, + options?: Options, + callback?: (err?: any, server?: Server) => void): Promise; diff --git a/types/glue/v4/tsconfig.json b/types/glue/v4/tsconfig.json new file mode 100644 index 0000000000..ead9b81629 --- /dev/null +++ b/types/glue/v4/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "boom": [ "boom/v4" ], + "catbox": [ "catbox/v7" ], + "hapi": [ "hapi/v16" ], + "glue": [ "glue/v4" ] + } + }, + "files": [ + "index.d.ts", + "glue-tests.ts" + ] +} diff --git a/types/glue/v4/tslint.json b/types/glue/v4/tslint.json new file mode 100644 index 0000000000..30a1bdde2e --- /dev/null +++ b/types/glue/v4/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file From 76c49f0c9dac7a2baab6db234571cc2748aae8d1 Mon Sep 17 00:00:00 2001 From: Greg Jednaszewski Date: Tue, 23 Oct 2018 11:31:30 -0400 Subject: [PATCH 0057/1121] Match hapi v16 typescript version --- types/glue/v4/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/glue/v4/index.d.ts b/types/glue/v4/index.d.ts index c6f5a14679..69c7d56d01 100644 --- a/types/glue/v4/index.d.ts +++ b/types/glue/v4/index.d.ts @@ -1,8 +1,8 @@ -// Type definitions for glue 4.0 +// Type definitions for glue 4.2 // Project: https://github.com/hapijs/glue // Definitions by: Greg Jednaszewski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.4 import { Server, ServerConnectionOptions, ServerOptions } from "hapi"; From bbdf8ce9dbb462f488b49234e8dacec1ac167e8f Mon Sep 17 00:00:00 2001 From: Guillaume Mayer Date: Wed, 24 Oct 2018 02:45:19 -0300 Subject: [PATCH 0058/1121] koa-router: router.url with 3rd argument (query) --- types/koa-router/index.d.ts | 22 ++++++++++++++++++++++ types/koa-router/koa-router-tests.ts | 8 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/types/koa-router/index.d.ts b/types/koa-router/index.d.ts index b5dc934965..29e85a75de 100644 --- a/types/koa-router/index.d.ts +++ b/types/koa-router/index.d.ts @@ -4,6 +4,7 @@ // Pavel Ivanov // JounQin // Romain Faust +// Guillaume Mayer // Definitions: https://github.com/hellopao/DefinitelyTyped // TypeScript Version: 2.3 @@ -86,6 +87,10 @@ declare namespace Router { sensitive?: boolean; strict?: boolean; } + + export interface IUrlOptionsQuery { + query?: object | string; + } export class ParamName { asterisk: boolean; @@ -262,6 +267,23 @@ declare class Router { url(name: string, params: Object): string; url(name: string, params: Object): Error; + /** + * Generate URL for route with query part. + * + * Takes either map of named `params` or series of + * arguments (for regular expression routes) + * + * Query is generated from `options` argument: + * + * router.url('user', { id: 3 }, { query: { limit: 1 } }); + * // => "/users/3?limit=1" + * + * router.url('user', { id: 3 }, { query: "limit=1" }); + * // => "/users/3?limit=1" + */ + url(name: string, params: Object, options?: Router.IUrlOptionsQuery): string; + url(name: string, params: Object, options?: Router.IUrlOptionsQuery): Error; + /** * Match given `path` and return corresponding routes. */ diff --git a/types/koa-router/koa-router-tests.ts b/types/koa-router/koa-router-tests.ts index b2bec9ad0c..d7b3807b2d 100644 --- a/types/koa-router/koa-router-tests.ts +++ b/types/koa-router/koa-router-tests.ts @@ -18,7 +18,13 @@ router ctx.body = ctx.router.url('user-accounts', { id: ctx.params.id }) }) .get('user-accounts', '/users/:id/accounts', function (ctx, next) { - // ... + ctx.body = { + test1: ctx.router.url('users', { id: 3 }, { query: { limit: 1 } }), + test2: ctx.router.url('users', { id: 3 }, { query: "limit=1" }), + test3: ctx.router.url('users', 3, { query: { limit: 1 } }), + test4: ctx.router.url('users', [3], { query: "limit=1" }), + test5: ctx.router.url('users', ["3"], { query: { limit: "1" } }), + } }) .post('/users', function (ctx, next) { // ... From 098ee2ffeb615c3387eda384750665d18a022099 Mon Sep 17 00:00:00 2001 From: Guillaume Mayer Date: Wed, 24 Oct 2018 03:33:15 -0300 Subject: [PATCH 0059/1121] remove 2 arg version, Object to any --- types/koa-router/index.d.ts | 22 ++++++++++------------ types/koa-router/koa-router-tests.ts | 18 +++++++++++------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/types/koa-router/index.d.ts b/types/koa-router/index.d.ts index 29e85a75de..93473626fa 100644 --- a/types/koa-router/index.d.ts +++ b/types/koa-router/index.d.ts @@ -263,26 +263,24 @@ declare class Router { /** * Generate URL for route. Takes either map of named `params` or series of * arguments (for regular expression routes) - */ - url(name: string, params: Object): string; - url(name: string, params: Object): Error; - - /** - * Generate URL for route with query part. * - * Takes either map of named `params` or series of - * arguments (for regular expression routes) + * router = new Router(); + * router.get('user', "/users/:id", ... * - * Query is generated from `options` argument: + * router.url('user', { id: 3 }); + * // => "/users/3" + * + * Query can be generated from third argument: * * router.url('user', { id: 3 }, { query: { limit: 1 } }); * // => "/users/3?limit=1" - * + * * router.url('user', { id: 3 }, { query: "limit=1" }); * // => "/users/3?limit=1" + * */ - url(name: string, params: Object, options?: Router.IUrlOptionsQuery): string; - url(name: string, params: Object, options?: Router.IUrlOptionsQuery): Error; + url(name: string, params: any, options?: Router.IUrlOptionsQuery): string; + url(name: string, params: any, options?: Router.IUrlOptionsQuery): Error; /** * Match given `path` and return corresponding routes. diff --git a/types/koa-router/koa-router-tests.ts b/types/koa-router/koa-router-tests.ts index d7b3807b2d..b5a4083146 100644 --- a/types/koa-router/koa-router-tests.ts +++ b/types/koa-router/koa-router-tests.ts @@ -14,16 +14,20 @@ router .get('/', function (ctx, next) { ctx.body = 'Hello World!'; }) - .get('/users/:id', function (ctx, next) { - ctx.body = ctx.router.url('user-accounts', { id: ctx.params.id }) + .get('user', '/users/:id', function (ctx, next) { + ctx.body = { + test1: ctx.router.url('user-accounts', { id: ctx.params.id }), + test2: ctx.router.url('user-accounts', ctx.params.id), + test3: ctx.router.url('user-accounts', [ctx.params.id]), + } }) .get('user-accounts', '/users/:id/accounts', function (ctx, next) { ctx.body = { - test1: ctx.router.url('users', { id: 3 }, { query: { limit: 1 } }), - test2: ctx.router.url('users', { id: 3 }, { query: "limit=1" }), - test3: ctx.router.url('users', 3, { query: { limit: 1 } }), - test4: ctx.router.url('users', [3], { query: "limit=1" }), - test5: ctx.router.url('users', ["3"], { query: { limit: "1" } }), + test1: ctx.router.url('user', { id: 3 }, { query: { limit: 1 } }), + test2: ctx.router.url('user', { id: 3 }, { query: "limit=1" }), + test3: ctx.router.url('user', 3, { query: { limit: 1 } }), + test4: ctx.router.url('user', [3], { query: "limit=1" }), + test5: ctx.router.url('user', ["3"], { query: { limit: "1" } }), } }) .post('/users', function (ctx, next) { From 5716e008b683da10856172d71f5fb77f689b6e62 Mon Sep 17 00:00:00 2001 From: Guillaume Mayer Date: Wed, 24 Oct 2018 03:49:19 -0300 Subject: [PATCH 0060/1121] query required --- types/koa-router/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/koa-router/index.d.ts b/types/koa-router/index.d.ts index 93473626fa..6763f8d7b8 100644 --- a/types/koa-router/index.d.ts +++ b/types/koa-router/index.d.ts @@ -89,7 +89,7 @@ declare namespace Router { } export interface IUrlOptionsQuery { - query?: object | string; + query: object | string; } export class ParamName { From ebadcef9b0aedc8229c83cafe5076a63f1515834 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:11:19 +0200 Subject: [PATCH 0061/1121] Add terser types Adds types for the terser module. Based on the uglify-js types. Extended and corrected some things. --- types/terser/index.d.ts | 493 +++++++++++++++++++++++++++++++++++ types/terser/package.json | 25 ++ types/terser/terser-tests.ts | 33 +++ types/terser/tsconfig.json | 23 ++ types/terser/tslint.json | 3 + 5 files changed, 577 insertions(+) create mode 100644 types/terser/index.d.ts create mode 100644 types/terser/package.json create mode 100644 types/terser/terser-tests.ts create mode 100644 types/terser/tsconfig.json create mode 100644 types/terser/tslint.json diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts new file mode 100644 index 0000000000..905ba01d6d --- /dev/null +++ b/types/terser/index.d.ts @@ -0,0 +1,493 @@ +// Type definitions for Terser 3.8.1 +// Project: https://github.com/terser-js/terser +// Definitions by: JordiAnderl +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import * as MOZ_SourceMap from "source-map"; + +declare module "terser" { + interface Tokenizer { + /** + * The type of this token. + * Can be "num", "string", "regexp", "operator", "punc", "atom", "name", "keyword", "comment1" or "comment2". + * "comment1" and "comment2" are for single-line, respectively multi-line comments. + */ + type: string; + + /** + * The name of the file where this token originated from. Useful when compressing multiple files at once to generate the proper source map. + */ + file: string; + + /** + * The "value" of the token. + * That's additional information and depends on the token type: "num", "string" and "regexp" tokens you get their literal value. + * - For "operator" you get the operator. + * - For "punc" it's the punctuation sign (parens, comma, semicolon etc). + * - For "atom", "name" and "keyword" it's the name of the identifier + * - For comments it's the body of the comment (excluding the initial "//" and "/*". + */ + value: string; + + /** + * The line number of this token in the original code. + * 1-based index. + */ + line: number; + + /** + * The column number of this token in the original code. + * 0-based index. + */ + col: number; + + /** + * Short for "newline before", it's a boolean that tells us whether there was a newline before this node in the original source. It helps for automatic semicolon insertion. + * For multi-line comments in particular this will be set to true if there either was a newline before this comment, or * * if this comment contains a newline. + */ + nlb: boolean; + + /** + * This doesn't apply for comment tokens, but for all other token types it will be an array of comment tokens that were found before. + */ + comments_before: string[]; + } + + class AST_Node { + // The first token of this node + start: AST_Node; + + // The last token of this node + end: AST_Node; + + value?: string | number; + file?: string; + property?: string; + key?: string; + + transform(tt: TreeTransformer): AST_Toplevel; + + walk(walker: TreeWalker): void; + } + + class AST_Toplevel extends AST_Node { + // Terser contains a scope analyzer which figures out variable/function definitions, references etc. + // You need to call it manually before compression or mangling. + // The figure_out_scope method is defined only on the AST_Toplevel node. + figure_out_scope(): void; + + // Get names that are optimized for GZip compression (names will be generated using the most frequent characters first) + compute_char_frequency(): void; + + mangle_names(): void; + + print(stream: OutputStream): void; + + print_to_string(options?: BeautifierOptions): string; + + } + + interface MinifyOptions { + spidermonkey?: boolean; + outSourceMap?: string; + sourceRoot?: string; + inSourceMap?: string; + fromString?: boolean; + warnings?: boolean; + mangle?: Object; + output?: MinifyOutput; + compress?: Object; + nameCache?: {}; + } + + interface MinifyOutput { + code: string; + map: string; + warnings?: string[]; + error?: string; + ast?: boolean | AST_Toplevel; + } + + function minify(files: {}, options?: MinifyOptions): MinifyOutput; + + + interface ParseOptions { + // Default is false + strict?: boolean; + + // Input file name, default is null + filename?: string; + + // Default is null + toplevel?: AST_Toplevel; + } + + /** + * The parser creates a custom abstract syntax tree given a piece of JavaScript code. + * Perhaps you should read about the AST first. + */ + function parse(code: string, options?: ParseOptions): AST_Toplevel; + + + interface BeautifierOptions { + /** + * Start indentation on every line (only when `beautify`) + */ + indent_start?: number; + + /** + * Indentation level (only when `beautify`) + */ + indent_level?: number; + + /** + * Quote all keys in object literals? + */ + quote_keys?: boolean; + + /** + * Add a space after colon signs? + */ + space_colon?: boolean; + + /** + * Output ASCII-safe? (encodes Unicode characters as ASCII) + */ + ascii_only?: boolean; + + /** + * Escape " AST_Scope; + stack: AST_Scope[]; + } + + type visitor = (node: AST_Node, descend: Function) => boolean | void; + + // TODO: + + /** + * The tree transformer is a special case of a tree walker. + * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. + */ + class TreeTransformer extends TreeWalker { + constructor(visitor: visitor, after: visitor); + } + + // TODO: http://lisperator.net/Terser/ast + + class AST_PropAccess extends AST_Node { + } + + class AST_ObjectKeyVal extends AST_Node { + } + + class AST_Scope extends AST_Node { + find_variable(name: string): AST_SymbolDeclaration; + } + + class AST_Symbol extends AST_Node { + scope?: AST_Scope; + name: string; + thedef: unknown; + } + + class AST_SymbolDeclaration extends AST_Symbol { + orig: AST_SymbolDeclaration[]; + references: AST_SymbolRef[]; + global: boolean; + undeclared: boolean; + constant: boolean; + mangledName?: string; + mangled_name?: string; + } + + class AST_SymbolRef extends AST_Symbol { + + } + + class AST_Call extends AST_Node { + expression: { name?: string, property?: string }; + args: AST_Node[]; + } + class AST_String extends AST_Node { + value: string; + } + class AST_Lambda extends AST_Node { + name?: string; + } + class AST_SymbolMethod extends AST_Node { + name?: string; + } + class AST_ConciseMethod extends AST_Node { + + } + class AST_SymbolVar extends AST_Node { + name?: string; + } +} + +export * from 'uglify-js'; + diff --git a/types/terser/package.json b/types/terser/package.json new file mode 100644 index 0000000000..11573ccf73 --- /dev/null +++ b/types/terser/package.json @@ -0,0 +1,25 @@ +{ + "name": "@types/terser", + "version": "3.8.1", + "private": true, + "description": "TypeScript definitions for terser", + "license": "MIT", + "contributors": [ + { + "name": "Jordi Anderl", + "url": "https://github.com/JordiAnderl", + "githubUsername": "JordiAnderl" + } + ], + "main": "", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" + }, + "scripts": {}, + "dependencies": { + "@types/uglify-js": "*", + "source-map": "*" + }, + "typeScriptVersion": "2.2" +} diff --git a/types/terser/terser-tests.ts b/types/terser/terser-tests.ts new file mode 100644 index 0000000000..49b9190070 --- /dev/null +++ b/types/terser/terser-tests.ts @@ -0,0 +1,33 @@ +/// + +import { OutputQuoteStyle, minify } from 'terser'; + +let code: any; + +code = { + "file1.js": "function add(first, second) { return first + second; }", + "file2.js": "console.log(add(1 + 2, 3 + 4));" +}; + +minify(code); + +code = "function add(first, second) { return first + second; }"; +minify(code); + +minify(code); + +const output = minify(code, { + warnings: true, + mangle: { + properties: { + regex: /reg/ + } + }, + compress: { + arguments: true + } +}); + +if (output.warnings) { + output.warnings.filter(x => x === 'Dropping unused variable'); +} diff --git a/types/terser/tsconfig.json b/types/terser/tsconfig.json new file mode 100644 index 0000000000..937a5d1350 --- /dev/null +++ b/types/terser/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "terser-tests.ts" + ] +} diff --git a/types/terser/tslint.json b/types/terser/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/terser/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From e7d57ca2eca9034a471c1c2f879883b7b1ecf60a Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:32:16 +0200 Subject: [PATCH 0062/1121] Changes in package.json Fix tests --- types/terser/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/types/terser/package.json b/types/terser/package.json index 11573ccf73..9c41e7c621 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -1,9 +1,7 @@ { "name": "@types/terser", "version": "3.8.1", - "private": true, "description": "TypeScript definitions for terser", - "license": "MIT", "contributors": [ { "name": "Jordi Anderl", From 8d4988084b9dc977e6d862d26191c6f29b72d99a Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:34:52 +0200 Subject: [PATCH 0063/1121] Fix dependencies --- types/terser/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/terser/package.json b/types/terser/package.json index 9c41e7c621..6ecaa25c92 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -16,7 +16,6 @@ }, "scripts": {}, "dependencies": { - "@types/uglify-js": "*", "source-map": "*" }, "typeScriptVersion": "2.2" From 2d88cac8f277e15b38f44f481481d1cdf1cb78ec Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:42:26 +0200 Subject: [PATCH 0064/1121] Private => true in package.json --- types/terser/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/terser/package.json b/types/terser/package.json index 6ecaa25c92..0e6e244d83 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -1,6 +1,7 @@ { "name": "@types/terser", "version": "3.8.1", + "private": true, "description": "TypeScript definitions for terser", "contributors": [ { From ea1a8d27fc2922b8b0a2bf72a3d1af15525b1275 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:48:08 +0200 Subject: [PATCH 0065/1121] Fix package.json should not include field name --- types/terser/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/terser/package.json b/types/terser/package.json index 0e6e244d83..00f3008570 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -1,5 +1,4 @@ { - "name": "@types/terser", "version": "3.8.1", "private": true, "description": "TypeScript definitions for terser", From caa5d977682db8e92d160f6cb66cd8ca3bea9b95 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:55:55 +0200 Subject: [PATCH 0066/1121] Remove version --- types/terser/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/terser/package.json b/types/terser/package.json index 00f3008570..118657f66f 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -1,5 +1,4 @@ { - "version": "3.8.1", "private": true, "description": "TypeScript definitions for terser", "contributors": [ From fe5a7299c3969f6bcffe209c47ffd7eefbb1d9c5 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:58:00 +0200 Subject: [PATCH 0067/1121] Description --- types/terser/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/terser/package.json b/types/terser/package.json index 118657f66f..cb7e199622 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -1,6 +1,5 @@ { "private": true, - "description": "TypeScript definitions for terser", "contributors": [ { "name": "Jordi Anderl", From f100cd5b1012cd2a3d4660030124e4ea7fd54f4c Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 10:59:14 +0200 Subject: [PATCH 0068/1121] Remove more fields --- types/terser/package.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/types/terser/package.json b/types/terser/package.json index cb7e199622..69ad27c300 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -1,18 +1,5 @@ { "private": true, - "contributors": [ - { - "name": "Jordi Anderl", - "url": "https://github.com/JordiAnderl", - "githubUsername": "JordiAnderl" - } - ], - "main": "", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, "dependencies": { "source-map": "*" }, From f9af6e5e914b1fb1496ff4aab2300c6424d446f6 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:01:02 +0200 Subject: [PATCH 0069/1121] Remove version --- types/terser/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/terser/package.json b/types/terser/package.json index 69ad27c300..25c65e7595 100644 --- a/types/terser/package.json +++ b/types/terser/package.json @@ -2,6 +2,5 @@ "private": true, "dependencies": { "source-map": "*" - }, - "typeScriptVersion": "2.2" + } } From 0b4f82865f437a3930db015adc645918df40cce5 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:08:51 +0200 Subject: [PATCH 0070/1121] Remove module declaration --- types/terser/index.d.ts | 904 ++++++++++++++++++++-------------------- 1 file changed, 450 insertions(+), 454 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 905ba01d6d..5a1d0e5aea 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Terser 3.8.1 +// Type definitions for terser 3.8.1 // Project: https://github.com/terser-js/terser // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -6,487 +6,483 @@ import * as MOZ_SourceMap from "source-map"; -declare module "terser" { - interface Tokenizer { - /** - * The type of this token. - * Can be "num", "string", "regexp", "operator", "punc", "atom", "name", "keyword", "comment1" or "comment2". - * "comment1" and "comment2" are for single-line, respectively multi-line comments. - */ - type: string; - - /** - * The name of the file where this token originated from. Useful when compressing multiple files at once to generate the proper source map. - */ - file: string; - - /** - * The "value" of the token. - * That's additional information and depends on the token type: "num", "string" and "regexp" tokens you get their literal value. - * - For "operator" you get the operator. - * - For "punc" it's the punctuation sign (parens, comma, semicolon etc). - * - For "atom", "name" and "keyword" it's the name of the identifier - * - For comments it's the body of the comment (excluding the initial "//" and "/*". - */ - value: string; - - /** - * The line number of this token in the original code. - * 1-based index. - */ - line: number; - - /** - * The column number of this token in the original code. - * 0-based index. - */ - col: number; - - /** - * Short for "newline before", it's a boolean that tells us whether there was a newline before this node in the original source. It helps for automatic semicolon insertion. - * For multi-line comments in particular this will be set to true if there either was a newline before this comment, or * * if this comment contains a newline. - */ - nlb: boolean; - - /** - * This doesn't apply for comment tokens, but for all other token types it will be an array of comment tokens that were found before. - */ - comments_before: string[]; - } - - class AST_Node { - // The first token of this node - start: AST_Node; - - // The last token of this node - end: AST_Node; - - value?: string | number; - file?: string; - property?: string; - key?: string; - - transform(tt: TreeTransformer): AST_Toplevel; - - walk(walker: TreeWalker): void; - } - - class AST_Toplevel extends AST_Node { - // Terser contains a scope analyzer which figures out variable/function definitions, references etc. - // You need to call it manually before compression or mangling. - // The figure_out_scope method is defined only on the AST_Toplevel node. - figure_out_scope(): void; - - // Get names that are optimized for GZip compression (names will be generated using the most frequent characters first) - compute_char_frequency(): void; - - mangle_names(): void; - - print(stream: OutputStream): void; - - print_to_string(options?: BeautifierOptions): string; - - } - - interface MinifyOptions { - spidermonkey?: boolean; - outSourceMap?: string; - sourceRoot?: string; - inSourceMap?: string; - fromString?: boolean; - warnings?: boolean; - mangle?: Object; - output?: MinifyOutput; - compress?: Object; - nameCache?: {}; - } - - interface MinifyOutput { - code: string; - map: string; - warnings?: string[]; - error?: string; - ast?: boolean | AST_Toplevel; - } - - function minify(files: {}, options?: MinifyOptions): MinifyOutput; - - - interface ParseOptions { - // Default is false - strict?: boolean; - - // Input file name, default is null - filename?: string; - - // Default is null - toplevel?: AST_Toplevel; - } +export interface Tokenizer { + /** + * The type of this token. + * Can be "num", "string", "regexp", "operator", "punc", "atom", "name", "keyword", "comment1" or "comment2". + * "comment1" and "comment2" are for single-line, respectively multi-line comments. + */ + type: string; /** - * The parser creates a custom abstract syntax tree given a piece of JavaScript code. - * Perhaps you should read about the AST first. + * The name of the file where this token originated from. Useful when compressing multiple files at once to generate the proper source map. */ - function parse(code: string, options?: ParseOptions): AST_Toplevel; - - - interface BeautifierOptions { - /** - * Start indentation on every line (only when `beautify`) - */ - indent_start?: number; - - /** - * Indentation level (only when `beautify`) - */ - indent_level?: number; - - /** - * Quote all keys in object literals? - */ - quote_keys?: boolean; - - /** - * Add a space after colon signs? - */ - space_colon?: boolean; - - /** - * Output ASCII-safe? (encodes Unicode characters as ASCII) - */ - ascii_only?: boolean; - - /** - * Escape " AST_Scope; - stack: AST_Scope[]; - } - - type visitor = (node: AST_Node, descend: Function) => boolean | void; - - // TODO: + nlb: boolean; /** - * The tree transformer is a special case of a tree walker. - * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. + * This doesn't apply for comment tokens, but for all other token types it will be an array of comment tokens that were found before. */ - class TreeTransformer extends TreeWalker { - constructor(visitor: visitor, after: visitor); - } + comments_before: string[]; +} - // TODO: http://lisperator.net/Terser/ast +declare class AST_Node { + // The first token of this node + start: AST_Node; - class AST_PropAccess extends AST_Node { - } + // The last token of this node + end: AST_Node; - class AST_ObjectKeyVal extends AST_Node { - } + value?: string | number; + file?: string; + property?: string; + key?: string; - class AST_Scope extends AST_Node { - find_variable(name: string): AST_SymbolDeclaration; - } + transform(tt: TreeTransformer): AST_Toplevel; - class AST_Symbol extends AST_Node { - scope?: AST_Scope; - name: string; - thedef: unknown; - } + walk(walker: TreeWalker): void; +} - class AST_SymbolDeclaration extends AST_Symbol { - orig: AST_SymbolDeclaration[]; - references: AST_SymbolRef[]; - global: boolean; - undeclared: boolean; - constant: boolean; - mangledName?: string; - mangled_name?: string; - } +declare class AST_Toplevel extends AST_Node { + // Terser contains a scope analyzer which figures out variable/function definitions, references etc. + // You need to call it manually before compression or mangling. + // The figure_out_scope method is defined only on the AST_Toplevel node. + figure_out_scope(): void; - class AST_SymbolRef extends AST_Symbol { + // Get names that are optimized for GZip compression (names will be generated using the most frequent characters first) + compute_char_frequency(): void; - } + mangle_names(): void; - class AST_Call extends AST_Node { - expression: { name?: string, property?: string }; - args: AST_Node[]; - } - class AST_String extends AST_Node { - value: string; - } - class AST_Lambda extends AST_Node { - name?: string; - } - class AST_SymbolMethod extends AST_Node { - name?: string; - } - class AST_ConciseMethod extends AST_Node { + print(stream: OutputStream): void; - } - class AST_SymbolVar extends AST_Node { - name?: string; - } + print_to_string(options?: BeautifierOptions): string; + +} + +export interface MinifyOptions { + spidermonkey?: boolean; + outSourceMap?: string; + sourceRoot?: string; + inSourceMap?: string; + fromString?: boolean; + warnings?: boolean; + mangle?: {}; + output?: MinifyOutput; + compress?: {}; + nameCache?: {}; +} + +export interface MinifyOutput { + code: string; + map: string; + warnings?: string[]; + error?: string; + ast?: boolean | AST_Toplevel; +} + +declare function minify(files: {}, options?: MinifyOptions): MinifyOutput; + +export interface ParseOptions { + // Default is false + strict?: boolean; + + // Input file name, default is null + filename?: string; + + // Default is null + toplevel?: AST_Toplevel; +} + +/** + * The parser creates a custom abstract syntax tree given a piece of JavaScript code. + * Perhaps you should read about the AST first. + */ +declare function parse(code: string, options?: ParseOptions): AST_Toplevel; + +export interface BeautifierOptions { + /** + * Start indentation on every line (only when `beautify`) + */ + indent_start?: number; + + /** + * Indentation level (only when `beautify`) + */ + indent_level?: number; + + /** + * Quote all keys in {} literals? + */ + quote_keys?: boolean; + + /** + * Add a space after colon signs? + */ + space_colon?: boolean; + + /** + * Output ASCII-safe? (encodes Unicode characters as ASCII) + */ + ascii_only?: boolean; + + /** + * Escape " AST_Scope; + stack: AST_Scope[]; +} + +export type visitor = (node: AST_Node, descend: Function) => boolean | void; + +// TODO: + +/** + * The tree transformer is a special case of a tree walker. + * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. + */ +declare class TreeTransformer extends TreeWalker { + constructor(visitor: visitor, after: visitor); +} + +// TODO: http://lisperator.net/Terser/ast + +declare class AST_PropAccess extends AST_Node { +} + +declare class AST_{}KeyVal extends AST_Node { +} + +declare class AST_Scope extends AST_Node { + find_variable(name: string): AST_SymbolDeclaration; +} + +declare class AST_Symbol extends AST_Node { + scope?: AST_Scope; + name: string; + thedef: unknown; +} + +declare class AST_SymbolDeclaration extends AST_Symbol { + orig: AST_SymbolDeclaration[]; + references: AST_SymbolRef[]; + global: boolean; + undeclared: boolean; + constant: boolean; + mangledName?: string; + mangled_name?: string; +} + +declare class AST_SymbolRef extends AST_Symbol { + +} + +declare class AST_Call extends AST_Node { + expression: { name?: string, property?: string }; + args: AST_Node[]; +} +declare class AST_String extends AST_Node { + value: string; +} +declare class AST_Lambda extends AST_Node { + name?: string; +} +declare class AST_SymbolMethod extends AST_Node { + name?: string; +} +declare class AST_ConciseMethod extends AST_Node { + +} +declare class AST_SymbolVar extends AST_Node { + name?: string; } export * from 'uglify-js'; From cc0efe53659125a0fc0f449dddd16d5e7771d0ec Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:19:08 +0200 Subject: [PATCH 0071/1121] Remove declare --- types/terser/index.d.ts | 60 +++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 5a1d0e5aea..8e291379f1 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for terser 3.8.1 +// Type definitions for terser 3.8 // Project: https://github.com/terser-js/terser // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -53,7 +53,7 @@ export interface Tokenizer { comments_before: string[]; } -declare class AST_Node { +class AST_Node { // The first token of this node start: AST_Node; @@ -70,7 +70,7 @@ declare class AST_Node { walk(walker: TreeWalker): void; } -declare class AST_Toplevel extends AST_Node { +class AST_Toplevel extends AST_Node { // Terser contains a scope analyzer which figures out variable/function definitions, references etc. // You need to call it manually before compression or mangling. // The figure_out_scope method is defined only on the AST_Toplevel node. @@ -84,7 +84,6 @@ declare class AST_Toplevel extends AST_Node { print(stream: OutputStream): void; print_to_string(options?: BeautifierOptions): string; - } export interface MinifyOptions { @@ -108,7 +107,7 @@ export interface MinifyOutput { ast?: boolean | AST_Toplevel; } -declare function minify(files: {}, options?: MinifyOptions): MinifyOutput; +function minify(files: {}, options?: MinifyOptions): MinifyOutput; export interface ParseOptions { // Default is false @@ -125,7 +124,7 @@ export interface ParseOptions { * The parser creates a custom abstract syntax tree given a piece of JavaScript code. * Perhaps you should read about the AST first. */ -declare function parse(code: string, options?: ParseOptions): AST_Toplevel; +function parse(code: string, options?: ParseOptions): AST_Toplevel; export interface BeautifierOptions { /** @@ -213,7 +212,7 @@ export interface OutputStream { indentation(): number; // return the width of the current line text minus indentation. - current_width(): number + current_width(): number; // Return true if current_width() is bigger than options.width (assuming options.width is non-null, non-zero). should_break(): boolean; @@ -262,18 +261,18 @@ export interface OutputStream { // Sets the current indentation to col (column), calls the function and thereafter restores the previous indentation level. // If beautification is off it simply calls func. - with_indent(col: number, func: Function): void; + with_indent(col: number, func: () => void): void; // This is used to output blocks in curly brackets. // It'll print an open bracket at current point, then call newline() and with the next indentation level it calls your func. // Lastly, it'll print an indented closing bracket. As usual, if beautification is off you'll just get {x} where x is whatever func outputs. - with_block(func: Function): void; + with_block(func: () => void): void; // Adds parens around the output that your function prints. - with_parens(func: Function): void; + with_parens(func: () => void): void; // Adds square brackets around the output that your function prints. - with_square(func: Function): void; + with_square(func: () => void): void; // If options.source_map is set, this will generate a source mapping between the given token (which should be an AST_Token-like {}) and the current line/col. // The name is optional; in most cases it will be inferred from the token. @@ -307,8 +306,7 @@ export interface OutputStream { * The stream {} supports a lot of options that control the output. * You can specify whether you'd like to get human-readable (indented) output, the indentation level, whether you'd like to quote all properties in {} literals etc. */ -declare function OutputStream(options?: BeautifierOptions): OutputStream; - +function OutputStream(options?: BeautifierOptions): OutputStream; export interface SourceMapOptions { /** @@ -341,8 +339,7 @@ export interface SourceMap { * To use this functionality, you must load this library (it's automatically require-d by Terser in the NodeJS version, but in a browser you must load it yourself) * and make it available via the global MOZ_SourceMap variable. */ -declare function SourceMap(options?: SourceMapOptions): SourceMap; - +function SourceMap(options?: SourceMapOptions): SourceMap; export interface CompressorOptions { // Join consecutive statemets with the “comma operator” @@ -406,8 +403,7 @@ export interface CompressorOptions { /** * The compressor is a tree transformer which reduces the code size by applying various optimizations on the AST */ -declare function Compressor(options?: CompressorOptions): AST_Toplevel; - +function Compressor(options?: CompressorOptions): AST_Toplevel; // TODO: @@ -415,13 +411,13 @@ declare function Compressor(options?: CompressorOptions): AST_Toplevel; * Terser provides a TreeWalker {} and every node has a walk method that given a walker will apply your visitor to each node in the tree. * Your visitor can return a non-falsy value in order to prevent descending the current node. */ -declare class TreeWalker { +class TreeWalker { constructor(visitor: visitor); parent: () => AST_Scope; stack: AST_Scope[]; } -export type visitor = (node: AST_Node, descend: Function) => boolean | void; +export type visitor = (node: AST_Node, descend: () => void) => boolean | void; // TODO: @@ -429,29 +425,29 @@ export type visitor = (node: AST_Node, descend: Function) => boolean | void; * The tree transformer is a special case of a tree walker. * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. */ -declare class TreeTransformer extends TreeWalker { +class TreeTransformer extends TreeWalker { constructor(visitor: visitor, after: visitor); } // TODO: http://lisperator.net/Terser/ast -declare class AST_PropAccess extends AST_Node { +class AST_PropAccess extends AST_Node { } -declare class AST_{}KeyVal extends AST_Node { +class AST_ObjectKeyVal extends AST_Node { } -declare class AST_Scope extends AST_Node { +class AST_Scope extends AST_Node { find_variable(name: string): AST_SymbolDeclaration; } -declare class AST_Symbol extends AST_Node { +class AST_Symbol extends AST_Node { scope?: AST_Scope; name: string; thedef: unknown; } -declare class AST_SymbolDeclaration extends AST_Symbol { +class AST_SymbolDeclaration extends AST_Symbol { orig: AST_SymbolDeclaration[]; references: AST_SymbolRef[]; global: boolean; @@ -461,27 +457,27 @@ declare class AST_SymbolDeclaration extends AST_Symbol { mangled_name?: string; } -declare class AST_SymbolRef extends AST_Symbol { +class AST_SymbolRef extends AST_Symbol { } -declare class AST_Call extends AST_Node { +class AST_Call extends AST_Node { expression: { name?: string, property?: string }; args: AST_Node[]; } -declare class AST_String extends AST_Node { +class AST_String extends AST_Node { value: string; } -declare class AST_Lambda extends AST_Node { +class AST_Lambda extends AST_Node { name?: string; } -declare class AST_SymbolMethod extends AST_Node { +class AST_SymbolMethod extends AST_Node { name?: string; } -declare class AST_ConciseMethod extends AST_Node { +class AST_ConciseMethod extends AST_Node { } -declare class AST_SymbolVar extends AST_Node { +class AST_SymbolVar extends AST_Node { name?: string; } From 5f29885e56d1df8f85f2ea0e0ded0144735b11e8 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:21:27 +0200 Subject: [PATCH 0072/1121] Add some declare --- types/terser/index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 8e291379f1..9b859a0cf4 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -53,7 +53,7 @@ export interface Tokenizer { comments_before: string[]; } -class AST_Node { +declare class AST_Node { // The first token of this node start: AST_Node; @@ -429,7 +429,7 @@ class TreeTransformer extends TreeWalker { constructor(visitor: visitor, after: visitor); } -// TODO: http://lisperator.net/Terser/ast +// TODO: http://lisperator.net/Terser/ast class AST_PropAccess extends AST_Node { } @@ -458,7 +458,6 @@ class AST_SymbolDeclaration extends AST_Symbol { } class AST_SymbolRef extends AST_Symbol { - } class AST_Call extends AST_Node { @@ -475,7 +474,6 @@ class AST_SymbolMethod extends AST_Node { name?: string; } class AST_ConciseMethod extends AST_Node { - } class AST_SymbolVar extends AST_Node { name?: string; From 3444c92c1d3e7597ae88d72bb6f6775e3b3ca0c6 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:38:19 +0200 Subject: [PATCH 0073/1121] Replace delcares with export --- types/terser/index.d.ts | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 9b859a0cf4..e7f02d4942 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -53,7 +53,7 @@ export interface Tokenizer { comments_before: string[]; } -declare class AST_Node { +export class AST_Node { // The first token of this node start: AST_Node; @@ -70,7 +70,7 @@ declare class AST_Node { walk(walker: TreeWalker): void; } -class AST_Toplevel extends AST_Node { +export class AST_Toplevel extends AST_Node { // Terser contains a scope analyzer which figures out variable/function definitions, references etc. // You need to call it manually before compression or mangling. // The figure_out_scope method is defined only on the AST_Toplevel node. @@ -411,7 +411,7 @@ function Compressor(options?: CompressorOptions): AST_Toplevel; * Terser provides a TreeWalker {} and every node has a walk method that given a walker will apply your visitor to each node in the tree. * Your visitor can return a non-falsy value in order to prevent descending the current node. */ -class TreeWalker { +export class TreeWalker { constructor(visitor: visitor); parent: () => AST_Scope; stack: AST_Scope[]; @@ -425,29 +425,29 @@ export type visitor = (node: AST_Node, descend: () => void) => boolean | void; * The tree transformer is a special case of a tree walker. * In fact it even inherits from TreeWalker and you can use the same methods, but initialization and visitor protocol are a bit different. */ -class TreeTransformer extends TreeWalker { +export class TreeTransformer extends TreeWalker { constructor(visitor: visitor, after: visitor); } // TODO: http://lisperator.net/Terser/ast -class AST_PropAccess extends AST_Node { +export class AST_PropAccess extends AST_Node { } -class AST_ObjectKeyVal extends AST_Node { +export class AST_ObjectKeyVal extends AST_Node { } -class AST_Scope extends AST_Node { +export class AST_Scope extends AST_Node { find_variable(name: string): AST_SymbolDeclaration; } -class AST_Symbol extends AST_Node { +export class AST_Symbol extends AST_Node { scope?: AST_Scope; name: string; thedef: unknown; } -class AST_SymbolDeclaration extends AST_Symbol { +export class AST_SymbolDeclaration extends AST_Symbol { orig: AST_SymbolDeclaration[]; references: AST_SymbolRef[]; global: boolean; @@ -457,27 +457,26 @@ class AST_SymbolDeclaration extends AST_Symbol { mangled_name?: string; } -class AST_SymbolRef extends AST_Symbol { +export class AST_SymbolRef extends AST_Symbol { } -class AST_Call extends AST_Node { +export class AST_Call extends AST_Node { expression: { name?: string, property?: string }; args: AST_Node[]; } -class AST_String extends AST_Node { +export class AST_String extends AST_Node { value: string; } -class AST_Lambda extends AST_Node { +export class AST_Lambda extends AST_Node { name?: string; } -class AST_SymbolMethod extends AST_Node { +export class AST_SymbolMethod extends AST_Node { name?: string; } -class AST_ConciseMethod extends AST_Node { +export class AST_ConciseMethod extends AST_Node { } -class AST_SymbolVar extends AST_Node { +export class AST_SymbolVar extends AST_Node { name?: string; } export * from 'uglify-js'; - From f8665dbf39f8df48828b2f6bdd6905dadb7bfbcb Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:43:59 +0200 Subject: [PATCH 0074/1121] Export functions --- types/terser/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index e7f02d4942..44290580e7 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -107,7 +107,7 @@ export interface MinifyOutput { ast?: boolean | AST_Toplevel; } -function minify(files: {}, options?: MinifyOptions): MinifyOutput; +export function minify(files: {}, options?: MinifyOptions): MinifyOutput; export interface ParseOptions { // Default is false @@ -124,7 +124,7 @@ export interface ParseOptions { * The parser creates a custom abstract syntax tree given a piece of JavaScript code. * Perhaps you should read about the AST first. */ -function parse(code: string, options?: ParseOptions): AST_Toplevel; +export function parse(code: string, options?: ParseOptions): AST_Toplevel; export interface BeautifierOptions { /** @@ -306,7 +306,7 @@ export interface OutputStream { * The stream {} supports a lot of options that control the output. * You can specify whether you'd like to get human-readable (indented) output, the indentation level, whether you'd like to quote all properties in {} literals etc. */ -function OutputStream(options?: BeautifierOptions): OutputStream; +export function OutputStream(options?: BeautifierOptions): OutputStream; export interface SourceMapOptions { /** @@ -339,7 +339,7 @@ export interface SourceMap { * To use this functionality, you must load this library (it's automatically require-d by Terser in the NodeJS version, but in a browser you must load it yourself) * and make it available via the global MOZ_SourceMap variable. */ -function SourceMap(options?: SourceMapOptions): SourceMap; +export function SourceMap(options?: SourceMapOptions): SourceMap; export interface CompressorOptions { // Join consecutive statemets with the “comma operator” @@ -403,7 +403,7 @@ export interface CompressorOptions { /** * The compressor is a tree transformer which reduces the code size by applying various optimizations on the AST */ -function Compressor(options?: CompressorOptions): AST_Toplevel; +export function Compressor(options?: CompressorOptions): AST_Toplevel; // TODO: From 84cff26fd07473c6286c8266777625e084a39ed8 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:45:45 +0200 Subject: [PATCH 0075/1121] Fix typescript version --- types/terser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 44290580e7..1ec8a298e9 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/terser-js/terser // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 3.0 import * as MOZ_SourceMap from "source-map"; From a405a07298cdcd6a7d5f4608b9bca66d548e519b Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 11:59:21 +0200 Subject: [PATCH 0076/1121] Update types and stop using uglify.js --- types/terser/index.d.ts | 177 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 172 insertions(+), 5 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 1ec8a298e9..887be7b2b5 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -93,9 +93,9 @@ export interface MinifyOptions { inSourceMap?: string; fromString?: boolean; warnings?: boolean; - mangle?: {}; - output?: MinifyOutput; - compress?: {}; + mangle?: boolean | MangleOptions; + output?: OutputOptions; + compress?: boolean | CompressOptions; nameCache?: {}; } @@ -119,6 +119,175 @@ export interface ParseOptions { // Default is null toplevel?: AST_Toplevel; } +export interface CompressOptions { + /** Replace `arguments[index]` with function parameter name whenever possible. */ + arguments?: boolean; + /** Various optimizations for boolean context, for example `!!a ? b : c → a ? b : c` */ + booleans?: boolean; + /** Collapse single-use non-constant variables, side effects permitting. */ + collapse_vars?: boolean; + /** Apply certain optimizations to binary nodes, e.g. `!(a <= b) → a > b,` attempts to negate binary nodes, e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc */ + comparisons?: boolean; + /** Apply optimizations for `if-s` and conditional expressions. */ + conditionals?: boolean; + /** Remove unreachable code */ + dead_code?: boolean; + /** + * Pass `true` to discard calls to console.* functions. + * If you wish to drop a specific function call such as `console.info` and/or retain side effects from function + * arguments after dropping the function call then use `pure_funcs` instead. + */ + drop_console?: boolean; + /** Remove `debugger;` statements */ + drop_debugger?: boolean; + /** Attempt to evaluate constant expressions */ + evaluate?: boolean; + /** Pass `true` to preserve completion values from terminal statements without `return`, e.g. in bookmarklets. */ + expression?: boolean; + global_defs?: object; + /** hoist function declarations */ + hoist_funs?: boolean; + /** + * Hoist properties from constant object and array literals into regular variables subject to a set of constraints. + * For example: `var o={p:1, q:2}; f(o.p, o.q);` is converted to `f(1, 2);`. Note: `hoist_props` works best with mangle enabled, + * the compress option passes set to 2 or higher, and the compress option toplevel enabled. + */ + hoist_props?: boolean; + /** Hoist var declarations (this is `false` by default because it seems to increase the size of the output in general) */ + hoist_vars?: boolean; + /** Optimizations for if/return and if/continue */ + if_return?: boolean; + /** + * Inline calls to function with simple/return statement + * - false -- same as `Disabled` + * - `Disabled` -- disabled inlining + * - `SimpleFunctions` -- inline simple functions + * - `WithArguments` -- inline functions with arguments + * - `WithArgumentsAndVariables` -- inline functions with arguments and variables + * - true -- same as `WithArgumentsAndVariables` + */ + inline?: boolean | InlineFunctions; + /** join consecutive `var` statements */ + join_vars?: boolean; + /** Prevents the compressor from discarding unused function arguments. You need this for code which relies on `Function.length` */ + keep_fargs?: boolean; + /** Pass true to prevent the compressor from discarding function names. Useful for code relying on `Function.prototype.name`. */ + keep_fnames?: boolean; + /** Pass true to prevent Infinity from being compressed into `1/0`, which may cause performance issues on `Chrome` */ + keep_infinity?: boolean; + /** Optimizations for `do`, `while` and `for` loops when we can statically determine the condition. */ + loops?: boolean; + /** negate `Immediately-Called Function Expressions` where the return value is discarded, to avoid the parens that the code generator would insert. */ + negate_iife?: boolean; + /** The maximum number of times to run compress. In some cases more than one pass leads to further compressed code. Keep in mind more passes will take more time. */ + passes?: number; + /** Rewrite property access using the dot notation, for example `foo["bar"]` to `foo.bar` */ + properties?: boolean; + /** + * An array of names and UglifyJS will assume that those functions do not produce side effects. + * DANGER: will not check if the name is redefined in scope. + * An example case here, for instance `var q = Math.floor(a/b)`. + * If variable q is not used elsewhere, UglifyJS will drop it, but will still keep the `Math.floor(a/b)`, + * not knowing what it does. You can pass `pure_funcs: [ 'Math.floor' ]` to let it know that this function + * won't produce any side effect, in which case the whole statement would get discarded. The current + * implementation adds some overhead (compression will be slower). + */ + pure_funcs?: string[]; + pure_getters?: boolean | 'strict'; + /** + * Allows single-use functions to be inlined as function expressions when permissible allowing further optimization. + * Enabled by default. Option depends on reduce_vars being enabled. Some code runs faster in the Chrome V8 engine if + * this option is disabled. Does not negatively impact other major browsers. + */ + reduce_funcs?: boolean; + /** Improve optimization on variables assigned with and used as constant values. */ + reduce_vars?: boolean; + sequences?: boolean; + /** Pass false to disable potentially dropping functions marked as "pure". */ + side_effects?: boolean; + /** De-duplicate and remove unreachable `switch` branches. */ + switches?: boolean; + /** Drop unreferenced functions ("funcs") and/or variables ("vars") in the top level scope (false by default, true to drop both unreferenced functions and variables) */ + toplevel?: boolean; + /** Prevent specific toplevel functions and variables from unused removal (can be array, comma-separated, RegExp or function. Implies toplevel) */ + top_retain?: boolean; + typeofs?: boolean; + unsafe?: boolean; + /** Compress expressions like a `<= b` assuming none of the operands can be (coerced to) `NaN`. */ + unsafe_comps?: boolean; + /** Compress and mangle `Function(args, code)` when both args and code are string literals. */ + unsafe_Function?: boolean; + /** Optimize numerical expressions like `2 * x * 3` into `6 * x`, which may give imprecise floating point results. */ + unsafe_math?: boolean; + /** Optimize expressions like `Array.prototype.slice.call(a)` into `[].slice.call(a)` */ + unsafe_proto?: boolean; + /** Enable substitutions of variables with `RegExp` values the same way as if they are constants. */ + unsafe_regexp?: boolean; + unsafe_undefined?: boolean; + unused?: boolean; + /** display warnings when dropping unreachable code or unused declarations etc. */ + warnings?: boolean; +} + +export enum InlineFunctions { + Disabled = 0, + SimpleFunctions = 1, + WithArguments = 2, + WithArgumentsAndVariables = 3 +} + +export interface MangleOptions { + /** Pass true to mangle names visible in scopes where `eval` or with are used. */ + eval?: boolean; + /** Pass true to not mangle function names. Useful for code relying on `Function.prototype.name`. */ + keep_fnames?: boolean; + /** Pass an array of identifiers that should be excluded from mangling. Example: `["foo", "bar"]`. */ + reserved?: string[]; + /** Pass true to mangle names declared in the top level scope. */ + toplevel?: boolean; + properties?: boolean | ManglePropertiesOptions; +} + +export interface ManglePropertiesOptions { + /** Use true to allow the mangling of builtin DOM properties. Not recommended to override this setting. */ + builtins?: boolean; + /** Mangle names with the original name still present. Pass an empty string "" to enable, or a non-empty string to set the debug suffix. */ + debug?: boolean; + /** Only mangle unquoted property names */ + keep_quoted?: boolean; + /** Pass a RegExp literal to only mangle property names matching the regular expression. */ + regex?: RegExp; + /** Do not mangle property names listed in the reserved array */ + reserved?: string[]; +} + +export interface OutputOptions { + ascii_only?: boolean; + beautify?: boolean; + braces?: boolean; + comments?: boolean | 'all' | 'some' | RegExp; + indent_level?: number; + indent_start?: boolean; + inline_script?: boolean; + keep_quoted_props?: boolean; + max_line_len?: boolean | number; + preamble?: string; + preserve_line?: boolean; + quote_keys?: boolean; + quote_style?: OutputQuoteStyle; + semicolons?: boolean; + shebang?: boolean; + webkit?: boolean; + width?: number; + wrap_iife?: boolean; +} + +export enum OutputQuoteStyle { + PreferDouble = 0, + AlwaysSingle = 1, + AlwaysDouble = 2, + AlwaysOriginal = 3 +} /** * The parser creates a custom abstract syntax tree given a piece of JavaScript code. @@ -478,5 +647,3 @@ export class AST_ConciseMethod extends AST_Node { export class AST_SymbolVar extends AST_Node { name?: string; } - -export * from 'uglify-js'; From 0e511cf719a1733ed6752256c1594b7781a59fb6 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 12:14:01 +0200 Subject: [PATCH 0077/1121] Chage version --- types/terser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 887be7b2b5..c9a07c6d89 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/terser-js/terser // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 +// TypeScript Version: 3.0.0 import * as MOZ_SourceMap from "source-map"; From dabd0b47f8fa1304537db23fb7c285279a207b3f Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 12:32:26 +0200 Subject: [PATCH 0078/1121] Change typescript version Could not parse version: line is '// TypeScript Version: 3.0.0' --- types/terser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index c9a07c6d89..3e61a95655 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/terser-js/terser // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0.0 +// TypeScript Version: 3 import * as MOZ_SourceMap from "source-map"; From 4c5892c46ac97b49502b41ffacac49e5121afa43 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 12:36:18 +0200 Subject: [PATCH 0079/1121] Fix typescript version As seen in https://github.com/Microsoft/definitelytyped-header-parser/blob/master/index.ts --- types/terser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 3e61a95655..887be7b2b5 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/terser-js/terser // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3 +// TypeScript Version: 3.0 import * as MOZ_SourceMap from "source-map"; From 2b206bceb503d2a5e2c59561bd0cae96de62eb33 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Wed, 24 Oct 2018 12:55:55 +0200 Subject: [PATCH 0080/1121] Fix url --- types/terser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 887be7b2b5..f9367436c8 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -598,7 +598,7 @@ export class TreeTransformer extends TreeWalker { constructor(visitor: visitor, after: visitor); } -// TODO: http://lisperator.net/Terser/ast +// TODO: http://lisperator.net/uglifyjs/ast export class AST_PropAccess extends AST_Node { } From ea89485ed31827b073360568d9eca34e6401822a Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 09:44:07 -0500 Subject: [PATCH 0081/1121] Added Enhanced Page Objects Moved common functions for API and Page Objects to SharedFunctions --- types/nightwatch/index.d.ts | 778 +++++++++++++++++++----------------- 1 file changed, 409 insertions(+), 369 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index 30a7e491e0..eb084b828e 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -775,41 +775,13 @@ export interface NightwatchKeys { "COMMAND": string; } -export interface NightwatchAPI { +export interface NightwatchAPI extends SharedFunctions { assert: NightwatchAssertions; expect: Expect; verify: NightwatchAssertions; - /** - * Clear a textarea or a text input element's value. Uses elementIdValue protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.clearValue('input[type=text]'); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - */ - clearValue(selector: string, callback?: () => void): this; - - /** - * Simulates a click event on the given DOM element. Uses elementIdClick protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.click("#main ul li a.first"); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - */ - click(selector: string, callback?: () => void): this; - /** * Close the current window. This can be useful when you're working with multiple windows open (e.g. an OAuth login). Uses window protocol command. * @@ -867,26 +839,6 @@ export interface NightwatchAPI { */ end(callback?: () => void): this; - /** - * Retrieve the value of an attribute for a given DOM element. Uses elementIdAttribute protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.getAttribute("#main ul li a.first", "href", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value, "#home"); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param attribute: The attribute name to inspect. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The value of the attribute - */ - getAttribute(selector: string, attribute: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - /** * Retrieve a single cookie visible to the current page. The cookie is returned as a cookie JSON object, as defined here. * Uses cookie protocol command. @@ -924,87 +876,6 @@ export interface NightwatchAPI { */ getCookies(callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - /** - * Retrieve the value of a css property for a given DOM element. Uses elementIdCssProperty protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.getCssProperty("#main ul li a.first", "display", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value, 'inline'); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param cssProperty: The CSS property to inspect. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The value of the css property - */ - getCssProperty(selector: string, cssProperty: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - - /** - * Determine an element's size in pixels. Uses elementIdSize protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.getElementSize("#main ul li a.first", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value.width, 500); - * this.assert.equal(result.value.height, 20); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The width and height of the element in pixels - */ - getElementSize(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - - /** - * Determine an element's location on the page. The point (0, 0) refers to the upper-left corner of the page. - * The element's coordinates are returned as a JSON object with x and y properties. Uses elementIdLocation protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.getLocation("#main ul li a.first", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value.x, 200); - * this.assert.equal(result.value.y, 200); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The X and Y coordinates for the element on the page - */ - getLocation(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - - /** - * Determine an element's location on the screen once it has been scrolled into view. Uses elementIdLocationInView protocol command. - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.getLocationInView("#main ul li a.first", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value.x, 200); - * this.assert.equal(result.value.y, 200); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The X and Y coordinates for the element on the page. - */ - getLocationInView(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - /** * Gets a log from selenium * @@ -1040,44 +911,6 @@ export interface NightwatchAPI { */ getLogTypes(callback?: (result: NightwatchCallbackResult) => void): this; - /** - * Query for an element's tag name. Uses elementIdName protocol command. - * - * Usage: - * ``` - * this.demoTest = function (client) { - * client.getTagName("#main ul li .first", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value, "a"); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The element's tag name, as a lowercase string. - */ - getTagName(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - - /** - * Returns the visible text for the element. Uses elementIdText protocol command. - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.getText("#main ul li a.first", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value, "nightwatchjs.org"); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The element's visible text. - */ - getText(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - /** * Returns the title of the current page. Uses title protocol command. * @@ -1095,25 +928,6 @@ export interface NightwatchAPI { */ getTitle(callback?: (this: NightwatchAPI, result?: string) => void): this; - /** - * Returns a form element current value. Uses elementIdValue protocol command. - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.getValue("form.login input[type=text]", function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value, "enter username"); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - * @returns The element's value. - */ - getValue(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - /** * This command is an alias to url and also a convenience method when called without any arguments in the sense that it performs a call to .url() with passing the value of launch_url * field from the settings file. Uses url protocol command. @@ -1162,24 +976,6 @@ export interface NightwatchAPI { */ isLogAvailable(typeString: string, callback?: (result: NightwatchCallbackResult) => void): this; - /** - * Determine if an element is currently displayed. Uses elementIdDisplayed protocol command. - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.isVisible('#main', function(result) { - * this.assert.equal(typeof result, "object"); - * this.assert.equal(result.status, 0); - * this.assert.equal(result.value, true); - * }); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - */ - isVisible(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; - /** * Maximizes the current window. * @@ -1193,22 +989,6 @@ export interface NightwatchAPI { */ maximizeWindow(callback?: (result: NightwatchCallbackResult) => void): this; - /** - * Move the mouse by an offset of the specified element. Uses moveTo protocol command. - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.moveToElement('#main', 10, 10); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param xoffset: X offset to move to, relative to the top-left corner of the element. - * @param yoffset: Y offset to move to, relative to the top-left corner of the element. - * @param callback: Optional callback function to be called when the command finishes. - */ - moveToElement(selector: string, xoffset: number, yoffset: number, callback?: (result: NightwatchCallbackResult) => void): this; - /** * Suspends the test for the given time in milliseconds. If the milliseconds argument is missing it will suspend the test indefinitely * @@ -1368,30 +1148,6 @@ export interface NightwatchAPI { */ setCookie(cookie: any, callback?: () => void): this; - /** - * Sends some text to an element. Can be used to set the value of a form element or to send a sequence of key strokes to an element. Any UTF-8 character may be specified. - * An object map with available keys and their respective UTF-8 characters, as defined on W3C WebDriver draft spec (http://www.w3.org/TR/webdriver/#character-types), - * is loaded onto the main Nightwatch instance as client.Keys. - * - * Usage: - * ``` - * // send some simple text to an input - * this.demoTest = function (browser) { - * browser.setValue('input[type=text]', 'nightwatch'); - * }; - * - * // - * // send some text to an input and hit enter. - * this.demoTest = function (browser) { - * browser.setValue('input[type=text]', ['nightwatch', browser.Keys.ENTER]); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param inputValue: The text to send to the element or key strokes. - * @param callback: Optional callback function to be called when the command finishes. - */ - setValue(selector: string, inputValue: string, callback?: () => void): this; - /** * Sets the current window position. * @@ -1407,20 +1163,6 @@ export interface NightwatchAPI { */ setWindowPosition(OffsetX: number, OffsetY: number, callback?: () => void): this; - /** - * Submit a FORM element. The submit command may also be applied to any element that is a descendant of a FORM element. Uses submit protocol command. - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.submitForm('form.login'); - * }; - * ``` - * @param selector: The CSS/Xpath selector used to locate the element. - * @param callback: Optional callback function to be called when the command finishes. - */ - submitForm(selector: string, callback?: () => void): this; - /** * Change focus to another window. The window to change focus to may be specified by its server assigned window handle, or by the value of its name attribute. * To find out the window handle use window_handles protocol action @@ -1455,116 +1197,6 @@ export interface NightwatchAPI { */ urlHash(hash: string): this; - /** - * Opposite of waitForElementPresent. Waits a given time in milliseconds for an element to be not present (i.e. removed) in the page before performing any other commands - * or assertions. If the element is still present after the specified amount of time, the test fails. You can change the polling interval by defining - * a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json or in your external globals file. - * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.waitForElementNotPresent('#dialog', 1000); - * }; - * ``` - * @param selector: The selector (CSS / Xpath) used to locate the element. - * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. - * @param abortOnFailure: By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. - * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. - * @param callback: Optional callback function to be called when the command finishes. - * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time - * (e.g. Element %s was not in the page for %d ms). - */ - waitForElementNotPresent(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; - - /** - * Opposite of waitForElementVisible. Waits a given time in milliseconds for an element to be not visible (i.e. hidden but existing) in the page before performing - * any other commands or assertions. If the element fails to be hidden in the specified amount of time, the test fails. You can change the polling interval by - * defining a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json or in your external globals file. - * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.waitForElementNotVisible('#dialog', 1000); - * }; - * ``` - * @param selector: The selector (CSS / Xpath) used to locate the element. - * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. - * @param abortOnFailure: By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. - * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. - * @param callback: Optional callback function to be called when the command finishes. - * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time - * (e.g. Element %s was not in the page for %d ms). - */ - waitForElementNotVisible(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; - - /** - * Waits a given time in milliseconds for an element to be present in the page before performing any other commands or assertions. - * If the element fails to be present in the specified amount of time, the test fails. You can change this by setting abortOnFailure to false. - * You can change the polling interval by defining a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json or in - * your external globals file. - * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.waitForElementPresent('body', 1000); - * // continue if failed - * browser.waitForElementPresent('body', 1000, false); - * // with callback - * browser.waitForElementPresent('body', 1000, function() { - * // do something while we're here - * }); - * // custom Spanish message - * browser.waitForElementPresent('body', 1000, 'elemento %s no era presente en %d ms'); - * // many combinations possible - the message is always the last argument - * browser.waitForElementPresent('body', 1000, false, function() {}, 'elemento %s no era presente en %d ms'); - * }; - * ``` - * @param selector: The selector (CSS / Xpath) used to locate the element. - * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. - * @param abortOnFailure: By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. - * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. - * @param callback: Optional callback function to be called when the command finishes. - * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time - * (e.g. Element %s was not in the page for %d ms). - */ - waitForElementPresent(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; - - /** - * Waits a given time in milliseconds for an element to be visible in the page before performing any other commands or assertions. - * If the element fails to be present and visible in the specified amount of time, the test fails. You can change this by setting abortOnFailure to false. - * You can change the polling interval by defining a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json - * or in your external globals file. - * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). - * - * Usage: - * ``` - * this.demoTest = function (browser) { - * browser.waitForElementVisible('body', 1000); - * // continue if failed - * browser.waitForElementVisible('body', 1000, false); - * // with callback - * browser.waitForElementVisible('body', 1000, function() { - * // do something while we're here - * }); - * // custom Spanish message - * browser.waitForElementVisible('body', 1000, 'elemento %s no era visible en %d ms'); - * // many combinations possible - the message is always the last argument - * browser.waitForElementVisible('body', 1000, false, function() {}, 'elemento %s no era visible en %d ms'); - * }; - * ``` - * @param selector: The selector (CSS / Xpath) used to locate the element. - * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. - * @param abortOnFailure: By the default if the element is not found the test will fail. - * Set this to false if you wish for the test to continue even if the assertion fails. - * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. - * @param callback: Optional callback function to be called when the command finishes. - * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time (e.g. Element %s was not in the page for %d ms). - */ - waitForElementVisible(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; - /** * Accepts the currently displayed alert dialog. Usually, this is equivalent to clicking on the 'OK' button in the dialog. * @param callback: Optional callback function to be called when the command finishes. @@ -2215,3 +1847,411 @@ export interface Nightwatch { api: NightwatchAPI; client: NightwatchClient; } + +export interface EnhancedElementInstance { + name: string; + locateStrategy: string; + parent: EnhancedPageObject | EnhancedSectionInstance; + selector: string; +} + +interface EnhancedPropObj { + props: {[key: string]: any}; +} + +interface EnhancedPropFunc { + props: () => any; +} + +type props = EnhancedPropFunc | EnhancedPropObj; + +interface urlString { + url: string; +} + +interface urlFunc { + url: () => any; +} + +type url = urlString | urlFunc; + +export interface EnhancedPageObject extends SharedFunctions { + api: NightwatchAPI; + elements: EnhancedElementInstance; + name: string; + props: props; + section: EnhancedSectionInstance; + url: url; +} + +export interface EnhancedSectionInstance extends EnhancedPageObject {} + +interface SharedFunctions { + /** + * Clear a textarea or a text input element's value. Uses elementIdValue protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.clearValue('input[type=text]'); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + */ + clearValue(selector: string, callback?: () => void): this; + + /** + * Simulates a click event on the given DOM element. Uses elementIdClick protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.click("#main ul li a.first"); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + */ + click(selector: string, callback?: () => void): this; + + /** + * Retrieve the value of an attribute for a given DOM element. Uses elementIdAttribute protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.getAttribute("#main ul li a.first", "href", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value, "#home"); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param attribute: The attribute name to inspect. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The value of the attribute + */ + getAttribute(selector: string, attribute: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Retrieve the value of a css property for a given DOM element. Uses elementIdCssProperty protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.getCssProperty("#main ul li a.first", "display", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value, 'inline'); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param cssProperty: The CSS property to inspect. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The value of the css property + */ + getCssProperty(selector: string, cssProperty: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Determine an element's size in pixels. Uses elementIdSize protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.getElementSize("#main ul li a.first", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value.width, 500); + * this.assert.equal(result.value.height, 20); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The width and height of the element in pixels + */ + getElementSize(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Determine an element's location on the page. The point (0, 0) refers to the upper-left corner of the page. + * The element's coordinates are returned as a JSON object with x and y properties. Uses elementIdLocation protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.getLocation("#main ul li a.first", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value.x, 200); + * this.assert.equal(result.value.y, 200); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The X and Y coordinates for the element on the page + */ + getLocation(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Determine an element's location on the screen once it has been scrolled into view. Uses elementIdLocationInView protocol command. + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.getLocationInView("#main ul li a.first", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value.x, 200); + * this.assert.equal(result.value.y, 200); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The X and Y coordinates for the element on the page. + */ + getLocationInView(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Query for an element's tag name. Uses elementIdName protocol command. + * + * Usage: + * ``` + * this.demoTest = function (client) { + * client.getTagName("#main ul li .first", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value, "a"); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The element's tag name, as a lowercase string. + */ + getTagName(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Returns the visible text for the element. Uses elementIdText protocol command. + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.getText("#main ul li a.first", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value, "nightwatchjs.org"); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The element's visible text. + */ + getText(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Returns a form element current value. Uses elementIdValue protocol command. + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.getValue("form.login input[type=text]", function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value, "enter username"); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + * @returns The element's value. + */ + getValue(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Determine if an element is currently displayed. Uses elementIdDisplayed protocol command. + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.isVisible('#main', function(result) { + * this.assert.equal(typeof result, "object"); + * this.assert.equal(result.status, 0); + * this.assert.equal(result.value, true); + * }); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + */ + isVisible(selector: string, callback?: (this: NightwatchAPI, result: NightwatchCallbackResult) => void): this; + + /** + * Move the mouse by an offset of the specified element. Uses moveTo protocol command. + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.moveToElement('#main', 10, 10); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param xoffset: X offset to move to, relative to the top-left corner of the element. + * @param yoffset: Y offset to move to, relative to the top-left corner of the element. + * @param callback: Optional callback function to be called when the command finishes. + */ + moveToElement(selector: string, xoffset: number, yoffset: number, callback?: (result: NightwatchCallbackResult) => void): this; + + /** + * Sends some text to an element. Can be used to set the value of a form element or to send a sequence of key strokes to an element. Any UTF-8 character may be specified. + * An object map with available keys and their respective UTF-8 characters, as defined on W3C WebDriver draft spec (http://www.w3.org/TR/webdriver/#character-types), + * is loaded onto the main Nightwatch instance as client.Keys. + * + * Usage: + * ``` + * // send some simple text to an input + * this.demoTest = function (browser) { + * browser.setValue('input[type=text]', 'nightwatch'); + * }; + * + * // + * // send some text to an input and hit enter. + * this.demoTest = function (browser) { + * browser.setValue('input[type=text]', ['nightwatch', browser.Keys.ENTER]); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param inputValue: The text to send to the element or key strokes. + * @param callback: Optional callback function to be called when the command finishes. + */ + setValue(selector: string, inputValue: string, callback?: () => void): this; + + /** + * Submit a FORM element. The submit command may also be applied to any element that is a descendant of a FORM element. Uses submit protocol command. + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.submitForm('form.login'); + * }; + * ``` + * @param selector: The CSS/Xpath selector used to locate the element. + * @param callback: Optional callback function to be called when the command finishes. + */ + submitForm(selector: string, callback?: () => void): this; + + /** + * Opposite of waitForElementPresent. Waits a given time in milliseconds for an element to be not present (i.e. removed) in the page before performing any other commands + * or assertions. If the element is still present after the specified amount of time, the test fails. You can change the polling interval by defining + * a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json or in your external globals file. + * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.waitForElementNotPresent('#dialog', 1000); + * }; + * ``` + * @param selector: The selector (CSS / Xpath) used to locate the element. + * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. + * @param abortOnFailure: By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. + * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. + * @param callback: Optional callback function to be called when the command finishes. + * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time + * (e.g. Element %s was not in the page for %d ms). + */ + waitForElementNotPresent(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; + + /** + * Opposite of waitForElementVisible. Waits a given time in milliseconds for an element to be not visible (i.e. hidden but existing) in the page before performing + * any other commands or assertions. If the element fails to be hidden in the specified amount of time, the test fails. You can change the polling interval by + * defining a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json or in your external globals file. + * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.waitForElementNotVisible('#dialog', 1000); + * }; + * ``` + * @param selector: The selector (CSS / Xpath) used to locate the element. + * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. + * @param abortOnFailure: By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. + * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. + * @param callback: Optional callback function to be called when the command finishes. + * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time + * (e.g. Element %s was not in the page for %d ms). + */ + waitForElementNotVisible(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; + + /** + * Waits a given time in milliseconds for an element to be present in the page before performing any other commands or assertions. + * If the element fails to be present in the specified amount of time, the test fails. You can change this by setting abortOnFailure to false. + * You can change the polling interval by defining a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json or in + * your external globals file. + * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.waitForElementPresent('body', 1000); + * // continue if failed + * browser.waitForElementPresent('body', 1000, false); + * // with callback + * browser.waitForElementPresent('body', 1000, function() { + * // do something while we're here + * }); + * // custom Spanish message + * browser.waitForElementPresent('body', 1000, 'elemento %s no era presente en %d ms'); + * // many combinations possible - the message is always the last argument + * browser.waitForElementPresent('body', 1000, false, function() {}, 'elemento %s no era presente en %d ms'); + * }; + * ``` + * @param selector: The selector (CSS / Xpath) used to locate the element. + * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. + * @param abortOnFailure: By the default if the element is not found the test will fail. Set this to false if you wish for the test to continue even if the assertion fails. + * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. + * @param callback: Optional callback function to be called when the command finishes. + * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time + * (e.g. Element %s was not in the page for %d ms). + */ + waitForElementPresent(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; + + /** + * Waits a given time in milliseconds for an element to be visible in the page before performing any other commands or assertions. + * If the element fails to be present and visible in the specified amount of time, the test fails. You can change this by setting abortOnFailure to false. + * You can change the polling interval by defining a waitForConditionPollInterval property (in milliseconds) in as a global property in your nightwatch.json + * or in your external globals file. + * Similarly, a default timeout can be specified as a global waitForConditionTimeout property (in milliseconds). + * + * Usage: + * ``` + * this.demoTest = function (browser) { + * browser.waitForElementVisible('body', 1000); + * // continue if failed + * browser.waitForElementVisible('body', 1000, false); + * // with callback + * browser.waitForElementVisible('body', 1000, function() { + * // do something while we're here + * }); + * // custom Spanish message + * browser.waitForElementVisible('body', 1000, 'elemento %s no era visible en %d ms'); + * // many combinations possible - the message is always the last argument + * browser.waitForElementVisible('body', 1000, false, function() {}, 'elemento %s no era visible en %d ms'); + * }; + * ``` + * @param selector: The selector (CSS / Xpath) used to locate the element. + * @param time: The number of milliseconds to wait. The runner performs repeated checks every 500 ms. + * @param abortOnFailure: By the default if the element is not found the test will fail. + * Set this to false if you wish for the test to continue even if the assertion fails. + * To set this globally you can define a property `abortOnNightwatchAssertionsFailure` in your globals. + * @param callback: Optional callback function to be called when the command finishes. + * @param message: Optional message to be shown in the output; the message supports two placeholders: %s for current selector and %d for the time (e.g. Element %s was not in the page for %d ms). + */ + waitForElementVisible(selector: string, time?: number, abortOnFailure?: boolean, callback?: () => void, message?: string): this; +} From 001a9ae75806b88ef76e43fcb415a341d0e4101e Mon Sep 17 00:00:00 2001 From: Philipp A Date: Wed, 24 Oct 2018 16:36:41 +0200 Subject: [PATCH 0082/1121] Reworked markdown-it --- types/markdown-it-anchor/index.d.ts | 4 +- types/markdown-it-container/index.d.ts | 4 +- .../markdown-it-container-tests.ts | 4 +- types/markdown-it-lazy-headers/index.d.ts | 2 +- types/markdown-it/index.d.ts | 232 +----------------- types/markdown-it/lib/index.d.ts | 113 +++++++++ types/markdown-it/lib/parser_block.d.ts | 11 + types/markdown-it/lib/parser_core.d.ts | 12 + types/markdown-it/lib/parser_inline.d.ts | 15 ++ types/markdown-it/lib/renderer.d.ts | 14 ++ types/markdown-it/lib/ruler.d.ts | 17 ++ .../lib/rules_block/state_block.d.ts | 25 ++ .../lib/rules_core/state_core.d.ts | 22 ++ .../lib/rules_inline/state_inline.d.ts | 48 ++++ types/markdown-it/lib/token.d.ts | 25 ++ types/markdown-it/markdown-it-tests.ts | 8 +- types/prosemirror-markdown/index.d.ts | 2 +- 17 files changed, 319 insertions(+), 239 deletions(-) create mode 100644 types/markdown-it/lib/index.d.ts create mode 100644 types/markdown-it/lib/parser_block.d.ts create mode 100644 types/markdown-it/lib/parser_core.d.ts create mode 100644 types/markdown-it/lib/parser_inline.d.ts create mode 100644 types/markdown-it/lib/renderer.d.ts create mode 100644 types/markdown-it/lib/ruler.d.ts create mode 100644 types/markdown-it/lib/rules_block/state_block.d.ts create mode 100644 types/markdown-it/lib/rules_core/state_core.d.ts create mode 100644 types/markdown-it/lib/rules_inline/state_inline.d.ts create mode 100644 types/markdown-it/lib/token.d.ts diff --git a/types/markdown-it-anchor/index.d.ts b/types/markdown-it-anchor/index.d.ts index fc4cead6d4..e0ef0dd9f9 100644 --- a/types/markdown-it-anchor/index.d.ts +++ b/types/markdown-it-anchor/index.d.ts @@ -4,7 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { MarkdownIt, Core, Token } from 'markdown-it'; +import * as MarkdownIt from 'markdown-it'; +import * as Core from 'markdown-it/lib/parser_core'; +import * as Token from 'markdown-it/lib/token'; declare namespace anchor { interface AnchorInfo { diff --git a/types/markdown-it-container/index.d.ts b/types/markdown-it-container/index.d.ts index b0913972fa..99c33958c5 100644 --- a/types/markdown-it-container/index.d.ts +++ b/types/markdown-it-container/index.d.ts @@ -4,7 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { MarkdownIt, Token, Renderer } from 'markdown-it'; +import * as MarkdownIt from 'markdown-it'; +import * as Renderer from 'markdown-it/lib/renderer'; +import * as Token from 'markdown-it/lib/token'; declare namespace markdownItContainer { interface ContainerOpts { diff --git a/types/markdown-it-container/markdown-it-container-tests.ts b/types/markdown-it-container/markdown-it-container-tests.ts index 3c8f3bf980..fcd46b80d9 100644 --- a/types/markdown-it-container/markdown-it-container-tests.ts +++ b/types/markdown-it-container/markdown-it-container-tests.ts @@ -1,11 +1,13 @@ import * as MarkdownIt from "markdown-it"; +import * as Token from "markdown-it/lib/token"; + import MarkdownItContainer = require("markdown-it-container"); const md = new MarkdownIt(); md.use(MarkdownItContainer, 'spoiler', { validate: (params: any) => params.trim().match(/^spoiler\s+(.*)$/), - render: (tokens: MarkdownIt.Token[], index: number) => { + render: (tokens: Token[], index: number) => { const match = tokens[index].info.trim().match(/^spoiler\s+(.*)$/); const onClick = "this.parentNode.classList.toggle('_expanded');" + diff --git a/types/markdown-it-lazy-headers/index.d.ts b/types/markdown-it-lazy-headers/index.d.ts index 0579118f80..f16c30e651 100644 --- a/types/markdown-it-lazy-headers/index.d.ts +++ b/types/markdown-it-lazy-headers/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { MarkdownIt } from 'markdown-it'; +import * as MarkdownIt from 'markdown-it'; declare function lazyheaders(md: MarkdownIt): void; diff --git a/types/markdown-it/index.d.ts b/types/markdown-it/index.d.ts index 0948a6d353..296d55f41c 100644 --- a/types/markdown-it/index.d.ts +++ b/types/markdown-it/index.d.ts @@ -4,235 +4,5 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -interface MarkdownItStatic { - new (): MarkdownIt.MarkdownIt; - new (presetName: "commonmark" | "zero" | "default", options?: MarkdownIt.Options): MarkdownIt.MarkdownIt; - new (options: MarkdownIt.Options): MarkdownIt.MarkdownIt; - (): MarkdownIt.MarkdownIt; - (presetName: "commonmark" | "zero" | "default", options ?: MarkdownIt.Options): MarkdownIt.MarkdownIt; - (options: MarkdownIt.Options): MarkdownIt.MarkdownIt; -} - -declare var MarkdownIt: MarkdownItStatic; +import * as MarkdownIt from "./lib"; export = MarkdownIt; -export as namespace markdownit; - -declare module MarkdownIt { - interface MarkdownIt { - render(md: string, env?: any): string; - renderInline(md: string, env?: any): string; - parse(src: string, env: any): Token[]; - parseInline(src: string, env: any): Token[]; - - /* - // The following only works in 3.0 - // Since it's still not allowed to target 3.0, i'll leave the code commented out - - use = any[]>( - plugin: (md: MarkdownIt, ...params: T) => void, - ...params: T - ): MarkdownIt; - */ - - use(plugin: (md: MarkdownIt, ...params: any[]) => void, ...params: any[]): MarkdownIt; - - utils: { - assign(obj: any): any; - isString(obj: any): boolean; - has(object: any, key: string): boolean; - unescapeMd(str: string): string; - unescapeAll(str: string): string; - isValidEntityCode(str: any): boolean; - fromCodePoint(str: string): string; - escapeHtml(str: string): string; - arrayReplaceAt(src: any[], pos: number, newElements: any[]): any[] - isSpace(str: any): boolean; - isWhiteSpace(str: any): boolean - isMdAsciiPunct(str: any): boolean; - isPunctChar(str: any): boolean; - escapeRE(str: string): string; - normalizeReference(str: string): string; - } - - disable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt; - enable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt; - set(options: Options): MarkdownIt; - normalizeLink(url: string): string; - normalizeLinkText(url: string): string; - validateLink(url: string): boolean; - block: ParserBlock; - core: Core; - helpers: any; - inline: ParserInline; - linkify: LinkifyIt; - renderer: Renderer; - } - interface Options { - html?: boolean; - xhtmlOut?: boolean; - breaks?: boolean; - langPrefix?: string; - linkify?: boolean; - typographer?: boolean; - quotes?: string; - highlight?: (str: string, lang: string) => void; - } - interface LinkifyIt { - tlds(lang: string, linkified: boolean): void; - } - interface Renderer { - rules: { [name: string]: TokenRender }; - render(tokens: Token[], options: any, env: any): string; - renderAttrs(token: Token): string; - renderInline(tokens: Token[], options: any, env: any): string; - renderToken(tokens: Token[], idx: number, options: any): string; - } - interface Token { - new (type: string, tag: string, nesting: number): Token; - attrGet: (name: string) => string | null; - attrIndex: (name: string) => number; - attrJoin: (name: string, value: string) => void; - attrPush: (attrData: string[]) => void; - attrSet: (name: string, value: string) => void; - attrs: string[][]; - block: boolean; - children: Token[]; - content: string; - hidden: boolean; - info: string; - level: number; - map: number[]; - markup: string; - meta: any; - nesting: number; - tag: string; - type: string; - } - - type TokenRender = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => void; - - interface Rule { - (state: S, silent?: boolean): boolean | void; - } - - interface RuleInline extends Rule {} - interface RuleBlock extends Rule {} - - interface Ruler { - after(afterName: string, ruleName: string, rule: Rule, options?: any): void; - at(name: string, rule: Rule, options?: any): void; - before(beforeName: string, ruleName: string, rule: Rule, options?: any): void; - disable(rules: string | string[], ignoreInvalid?: boolean): string[]; - enable(rules: string | string[], ignoreInvalid?: boolean): string[]; - enableOnly(rule: string, ignoreInvalid?: boolean): void; - getRules(chain: string): Rule[]; - push(ruleName: string, rule: Rule, options?: any): void; - } - - interface RulerInline extends Ruler {} - interface RulerBlock extends Ruler {} - - interface ParserBlock { - parse(src: string, md: MarkdownIt, env: any, outTokens: Token[]): void; - ruler: RulerBlock; - } - - interface Core { - process(state: any): void; - ruler: Ruler; - } - - interface ParserInline { - parse(src: string, md: MarkdownIt, env: any, outTokens: Token[]): void; - tokenize(state: State): void; - skipToken(state: State): void; - ruler: RulerInline; - ruler2: RulerInline; - } - - interface Delimiter { - close: boolean; - end: number; - jump: number; - length: number; - level: number; - marker: number; - open: boolean; - token: number; - } - - interface State { - env: any; - level: number; - - /** Link to parser instance */ - md: MarkdownIt; - - /** The markdown source code that is being parsed. */ - src: string; - - tokens: Token[]; - - /** Return any for a yet untyped property */ - [undocumented: string]: any; - } - - interface StateInline extends State { - /** - * Stores `{ start: end }` pairs. Useful for backtrack - * optimization of pairs parse (emphasis, strikes). - */ - cache: { [start: number]: number }; - - /** Emphasis-like delimiters */ - delimiters: Delimiter[]; - - pending: string; - pendingLevel: number; - - /** Index of the first character of this token. */ - pos: number; - - /** Index of the last character that can be used (for example the one before the end of this line). */ - posMax: number; - - /** - * Push new token to "stream". - * If pending text exists, flush it as text token. - */ - push(type: string, tag: string, nesting: number): Token; - - /** Flush pending text */ - pushPending(): Token; - - /** - * Scan a sequence of emphasis-like markers and determine whether - * it can start an emphasis sequence or end an emphasis sequence. - * @param start - position to scan from (it should point to a valid marker) - * @param canSplitWord - determine if these markers can be found inside a word - */ - scanDelims(start: number, canSplitWord: boolean): { - can_open: boolean, - can_close: boolean, - length: number - }; - } - - interface StateBlock extends State { - /** Used in lists to determine if they interrupt a paragraph */ - parentType: 'blockquote' | 'list' | 'root' | 'paragraph' | 'reference'; - - eMarks: number[]; - bMarks: number[]; - bsCount: number[]; - sCount: number[]; - tShift: number[]; - - blkIndent: number; - ddIndent: number; - - line: number; - lineMax: number; - tight: boolean; - } -} diff --git a/types/markdown-it/lib/index.d.ts b/types/markdown-it/lib/index.d.ts new file mode 100644 index 0000000000..5360d80b1a --- /dev/null +++ b/types/markdown-it/lib/index.d.ts @@ -0,0 +1,113 @@ +import { LinkifyIt } from 'linkify-it' + +import * as State from './rules_core/state_core'; +import * as StateBlock from './rules_block/state_block'; +import * as StateInline from './rules_inline/state_inline'; + +import * as Core from './parser_core'; +import * as ParserBlock from './parser_block'; +import * as ParserInline from './parser_inline'; + +import * as Renderer from './renderer'; +import * as Ruler from './ruler'; +import * as Token from './token'; + +export = MarkdownIt; +export as namespace markdownit; + +declare const MarkdownIt: MarkdownItConstructor; + +interface MarkdownItConstructor { + new (): MarkdownIt; + new (presetName: "commonmark" | "zero" | "default", options?: MarkdownIt.Options): MarkdownIt; + new (options: MarkdownIt.Options): MarkdownIt; + (): MarkdownIt; + (presetName: "commonmark" | "zero" | "default", options ?: MarkdownIt.Options): MarkdownIt; + (options: MarkdownIt.Options): MarkdownIt; +} + +interface MarkdownIt { + render(md: string, env?: any): string; + renderInline(md: string, env?: any): string; + parse(src: string, env: any): Token[]; + parseInline(src: string, env: any): Token[]; + + /* + // The following only works in 3.0 + // Since it's still not allowed to target 3.0, i'll leave the code commented out + + use = any[]>( + plugin: (md: MarkdownIt, ...params: T) => void, + ...params: T + ): MarkdownIt; + */ + + use(plugin: (md: MarkdownIt, ...params: any[]) => void, ...params: any[]): MarkdownIt; + + utils: { + assign(obj: any): any; + isString(obj: any): boolean; + has(object: any, key: string): boolean; + unescapeMd(str: string): string; + unescapeAll(str: string): string; + isValidEntityCode(str: any): boolean; + fromCodePoint(str: string): string; + escapeHtml(str: string): string; + arrayReplaceAt(src: any[], pos: number, newElements: any[]): any[] + isSpace(str: any): boolean; + isWhiteSpace(str: any): boolean + isMdAsciiPunct(str: any): boolean; + isPunctChar(str: any): boolean; + escapeRE(str: string): string; + normalizeReference(str: string): string; + } + + disable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt; + enable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt; + set(options: MarkdownIt.Options): MarkdownIt; + normalizeLink(url: string): string; + normalizeLinkText(url: string): string; + validateLink(url: string): boolean; + block: ParserBlock; + core: Core; + helpers: any; + inline: ParserInline; + linkify: LinkifyIt; + renderer: Renderer; +} + +declare module MarkdownIt { + interface Options { + html?: boolean; + xhtmlOut?: boolean; + breaks?: boolean; + langPrefix?: string; + linkify?: boolean; + typographer?: boolean; + quotes?: string; + highlight?: (str: string, lang: string) => void; + } + + interface Rule { + (state: S, silent?: boolean): boolean | void; + } + + interface RuleInline extends Rule {} + interface RuleBlock extends Rule {} + + interface RulerInline extends Ruler {} + interface RulerBlock extends Ruler {} + + type TokenRender = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => void; + + interface Delimiter { + close: boolean; + end: number; + jump: number; + length: number; + level: number; + marker: number; + open: boolean; + token: number; + } +} diff --git a/types/markdown-it/lib/parser_block.d.ts b/types/markdown-it/lib/parser_block.d.ts new file mode 100644 index 0000000000..288a791089 --- /dev/null +++ b/types/markdown-it/lib/parser_block.d.ts @@ -0,0 +1,11 @@ +import * as MarkdownIt from "."; +import * as Token from "./token"; + +export = ParserBlock; + +declare class ParserBlock { + parse(src: string, md: MarkdownIt, env: any, outTokens: Token[]): void; + ruler: MarkdownIt.RulerBlock; +} + +declare module ParserBlock {} diff --git a/types/markdown-it/lib/parser_core.d.ts b/types/markdown-it/lib/parser_core.d.ts new file mode 100644 index 0000000000..42d2759ab0 --- /dev/null +++ b/types/markdown-it/lib/parser_core.d.ts @@ -0,0 +1,12 @@ +import * as MarkdownIt from "."; +import * as Ruler from "./ruler"; +import * as Token from "./token"; + +export = ParserCore; + +declare class ParserCore { + process(state: any): void; + ruler: Ruler; +} + +declare module ParserCore {} diff --git a/types/markdown-it/lib/parser_inline.d.ts b/types/markdown-it/lib/parser_inline.d.ts new file mode 100644 index 0000000000..1be89e09f1 --- /dev/null +++ b/types/markdown-it/lib/parser_inline.d.ts @@ -0,0 +1,15 @@ +import * as MarkdownIt from "."; +import * as State from "./rules_core/state_core"; +import * as Token from "./token"; + +export = ParserInline; + +declare class ParserInline { + parse(src: string, md: MarkdownIt, env: any, outTokens: Token[]): void; + tokenize(state: State): void; + skipToken(state: State): void; + ruler: MarkdownIt.RulerInline; + ruler2: MarkdownIt.RulerInline; +} + +declare module ParserInline {} diff --git a/types/markdown-it/lib/renderer.d.ts b/types/markdown-it/lib/renderer.d.ts new file mode 100644 index 0000000000..51125309e6 --- /dev/null +++ b/types/markdown-it/lib/renderer.d.ts @@ -0,0 +1,14 @@ +import * as MarkdownIt from "."; +import * as Token from "./token"; + +export = Renderer; + +declare class Renderer { + rules: { [name: string]: MarkdownIt.TokenRender }; + render(tokens: Token[], options: any, env: any): string; + renderAttrs(token: Token): string; + renderInline(tokens: Token[], options: any, env: any): string; + renderToken(tokens: Token[], idx: number, options: any): string; +} + +declare module Renderer {} diff --git a/types/markdown-it/lib/ruler.d.ts b/types/markdown-it/lib/ruler.d.ts new file mode 100644 index 0000000000..106a3d1d72 --- /dev/null +++ b/types/markdown-it/lib/ruler.d.ts @@ -0,0 +1,17 @@ +import * as MarkdownIt from "."; +import * as State from "./rules_core/state_core"; + +export = Ruler; + +declare class Ruler { + after(afterName: string, ruleName: string, rule: MarkdownIt.Rule, options?: any): void; + at(name: string, rule: MarkdownIt.Rule, options?: any): void; + before(beforeName: string, ruleName: string, rule: MarkdownIt.Rule, options?: any): void; + disable(rules: string | string[], ignoreInvalid?: boolean): string[]; + enable(rules: string | string[], ignoreInvalid?: boolean): string[]; + enableOnly(rule: string, ignoreInvalid?: boolean): void; + getRules(chain: string): MarkdownIt.Rule[]; + push(ruleName: string, rule: MarkdownIt.Rule, options?: any): void; +} + +declare module Ruler {} diff --git a/types/markdown-it/lib/rules_block/state_block.d.ts b/types/markdown-it/lib/rules_block/state_block.d.ts new file mode 100644 index 0000000000..e1dc5a2fbd --- /dev/null +++ b/types/markdown-it/lib/rules_block/state_block.d.ts @@ -0,0 +1,25 @@ +import * as MarkdownIt from ".."; +import * as State from "../rules_core/state_core"; +import * as Token from "../token"; + +export = StateBlock; + +declare class StateBlock extends State { + /** Used in lists to determine if they interrupt a paragraph */ + parentType: 'blockquote' | 'list' | 'root' | 'paragraph' | 'reference'; + + eMarks: number[]; + bMarks: number[]; + bsCount: number[]; + sCount: number[]; + tShift: number[]; + + blkIndent: number; + ddIndent: number; + + line: number; + lineMax: number; + tight: boolean; +} + +declare module StateBlock {} diff --git a/types/markdown-it/lib/rules_core/state_core.d.ts b/types/markdown-it/lib/rules_core/state_core.d.ts new file mode 100644 index 0000000000..dc0eb54921 --- /dev/null +++ b/types/markdown-it/lib/rules_core/state_core.d.ts @@ -0,0 +1,22 @@ +import * as MarkdownIt from ".."; +import * as Token from "../token"; + +export = StateCore; + +declare class StateCore { + env: any; + level: number; + + /** Link to parser instance */ + md: MarkdownIt; + + /** The markdown source code that is being parsed. */ + src: string; + + tokens: Token[]; + + /** Return any for a yet untyped property */ + [undocumented: string]: any; +} + +declare module StateCore {} diff --git a/types/markdown-it/lib/rules_inline/state_inline.d.ts b/types/markdown-it/lib/rules_inline/state_inline.d.ts new file mode 100644 index 0000000000..eaa1feaa00 --- /dev/null +++ b/types/markdown-it/lib/rules_inline/state_inline.d.ts @@ -0,0 +1,48 @@ +import * as MarkdownIt from ".."; +import * as State from "../rules_core/state_core"; +import * as Token from "../token"; + +export = StateInline; + +declare class StateInline extends State { + /** + * Stores `{ start: end }` pairs. Useful for backtrack + * optimization of pairs parse (emphasis, strikes). + */ + cache: { [start: number]: number }; + + /** Emphasis-like delimiters */ + delimiters: MarkdownIt.Delimiter[]; + + pending: string; + pendingLevel: number; + + /** Index of the first character of this token. */ + pos: number; + + /** Index of the last character that can be used (for example the one before the end of this line). */ + posMax: number; + + /** + * Push new token to "stream". + * If pending text exists, flush it as text token. + */ + push(type: string, tag: string, nesting: number): Token; + + /** Flush pending text */ + pushPending(): Token; + + /** + * Scan a sequence of emphasis-like markers and determine whether + * it can start an emphasis sequence or end an emphasis sequence. + * @param start - position to scan from (it should point to a valid marker) + * @param canSplitWord - determine if these markers can be found inside a word + */ + scanDelims(start: number, canSplitWord: boolean): { + can_open: boolean, + can_close: boolean, + length: number + }; +} + +declare module StateInline {} diff --git a/types/markdown-it/lib/token.d.ts b/types/markdown-it/lib/token.d.ts new file mode 100644 index 0000000000..142b59289b --- /dev/null +++ b/types/markdown-it/lib/token.d.ts @@ -0,0 +1,25 @@ +export = Token; + +declare class Token { + constructor(type: string, tag: string, nesting: number); + attrGet: (name: string) => string | null; + attrIndex: (name: string) => number; + attrJoin: (name: string, value: string) => void; + attrPush: (attrData: string[]) => void; + attrSet: (name: string, value: string) => void; + attrs: string[][]; + block: boolean; + children: Token[]; + content: string; + hidden: boolean; + info: string; + level: number; + map: number[]; + markup: string; + meta: any; + nesting: number; + tag: string; + type: string; +} + +declare module Token {} diff --git a/types/markdown-it/markdown-it-tests.ts b/types/markdown-it/markdown-it-tests.ts index f22fc5cb2d..3cb1a9ea3b 100644 --- a/types/markdown-it/markdown-it-tests.ts +++ b/types/markdown-it/markdown-it-tests.ts @@ -1,4 +1,6 @@ import * as MarkdownIt from "markdown-it"; +import * as Renderer from "markdown-it/lib/renderer"; +import * as Token from "markdown-it/lib/token"; { const md = new MarkdownIt(); @@ -141,7 +143,7 @@ function myToken(tokens: any, idx: number, options: any, env: any, self: any) { return ""; }, }); - md.renderer.rules["image"] = (tokens: MarkdownIt.Token[], index: number, options: any, env: any, self: MarkdownIt.Renderer) => { + md.renderer.rules["image"] = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => { const token = tokens[index]; const aIndex = token.attrIndex("src"); token.attrs[aIndex][1]; @@ -154,11 +156,11 @@ function myToken(tokens: any, idx: number, options: any, env: any, self: any) { if (md.renderer.rules["link_open"]) { defaultLinkRender = md.renderer.rules["link_open"]; } else { - defaultLinkRender = (tokens: MarkdownIt.Token[], index: number, options: any, env: any, self: MarkdownIt.Renderer) => { + defaultLinkRender = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => { return self.renderToken(tokens, index, options); }; } - md.renderer.rules["link_open"] = (tokens: MarkdownIt.Token[], index: number, options: any, env: any, self: MarkdownIt.Renderer) => { + md.renderer.rules["link_open"] = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => { tokens[index].attrPush(["target", "_blank"]); tokens[index].attrPush(["rel", "nofollow"]); return defaultLinkRender(tokens, index, options, env, self); diff --git a/types/prosemirror-markdown/index.d.ts b/types/prosemirror-markdown/index.d.ts index 7af366c04e..7d18611513 100644 --- a/types/prosemirror-markdown/index.d.ts +++ b/types/prosemirror-markdown/index.d.ts @@ -7,7 +7,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import { MarkdownIt } from 'markdown-it'; +import * as MarkdownIt from 'markdown-it'; import { Node as ProsemirrorNode, Schema } from 'prosemirror-model'; /** From ccd51e7e798d85e6faac4cf3f51a391ab3bc4e3a Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 11:23:20 -0500 Subject: [PATCH 0083/1121] Changed page return type Gave an index signature for elements and section Removed props and url - someone who understands these more can add them --- types/nightwatch/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index eb084b828e..74f59d9663 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface NightwatchCustomPageObjects { - page: {[name: string]: () => NightwatchBrowser}; + page: {[name: string]: () => EnhancedPageObject}; } export interface NightwatchDesiredCapabilities { @@ -1877,7 +1877,7 @@ type url = urlString | urlFunc; export interface EnhancedPageObject extends SharedFunctions { api: NightwatchAPI; - elements: EnhancedElementInstance; + elements: {[name: string]: EnhancedElementInstance}; name: string; props: props; section: EnhancedSectionInstance; From 4e56d789dc0a69e47c0eba7cf784b521235e83c1 Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 11:26:15 -0500 Subject: [PATCH 0084/1121] Removed props and url --- types/nightwatch/index.d.ts | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index 74f59d9663..0bcb7f83b6 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1855,33 +1855,11 @@ export interface EnhancedElementInstance { selector: string; } -interface EnhancedPropObj { - props: {[key: string]: any}; -} - -interface EnhancedPropFunc { - props: () => any; -} - -type props = EnhancedPropFunc | EnhancedPropObj; - -interface urlString { - url: string; -} - -interface urlFunc { - url: () => any; -} - -type url = urlString | urlFunc; - export interface EnhancedPageObject extends SharedFunctions { api: NightwatchAPI; elements: {[name: string]: EnhancedElementInstance}; name: string; - props: props; - section: EnhancedSectionInstance; - url: url; + section: {[name: string]: EnhancedSectionInstance}; } export interface EnhancedSectionInstance extends EnhancedPageObject {} From 4e0b76207e0752ea959ccd3a1fbaf86c0e062526 Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 11:38:07 -0500 Subject: [PATCH 0085/1121] Removed the section definitions --- types/nightwatch/index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index 0bcb7f83b6..df47fadbd0 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1851,7 +1851,7 @@ export interface Nightwatch { export interface EnhancedElementInstance { name: string; locateStrategy: string; - parent: EnhancedPageObject | EnhancedSectionInstance; + parent: EnhancedPageObject; selector: string; } @@ -1859,11 +1859,8 @@ export interface EnhancedPageObject extends SharedFunctions { api: NightwatchAPI; elements: {[name: string]: EnhancedElementInstance}; name: string; - section: {[name: string]: EnhancedSectionInstance}; } -export interface EnhancedSectionInstance extends EnhancedPageObject {} - interface SharedFunctions { /** * Clear a textarea or a text input element's value. Uses elementIdValue protocol command. From d6b4b59d4928d59e03e841797dad6cb5a22000a9 Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 11:46:43 -0500 Subject: [PATCH 0086/1121] Export everything --- types/nightwatch/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index df47fadbd0..cbe75a9d94 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1861,7 +1861,7 @@ export interface EnhancedPageObject extends SharedFunctions { name: string; } -interface SharedFunctions { +export interface SharedFunctions { /** * Clear a textarea or a text input element's value. Uses elementIdValue protocol command. * From 9418b72625b934f07be3cd9f1682a5ef350ae7c8 Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 13:58:49 -0500 Subject: [PATCH 0087/1121] Bumped major version Added myself as a maintainer Added documentation --- types/nightwatch/index.d.ts | 51 ++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index cbe75a9d94..1b084e4d66 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for nightwatch 0.9 +// Type definitions for nightwatch 1.0 // Project: http://nightwatchjs.org/api // Definitions by: Rahul Kavalapara // Connor Schlesiger +// Clayton Astrom // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export interface NightwatchCustomPageObjects { @@ -1848,16 +1849,64 @@ export interface Nightwatch { client: NightwatchClient; } +/** + * [Enhanced Element Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-element-instances) + * + * Element instances encapsulate the definition used to handle element selectors. + * Generally you won't need to access them directly, + * instead referring to them using their `@`-prefixed names for selector arguments, + * but they are available through a page object or section's elements property. + */ export interface EnhancedElementInstance { + + /** + * The name of the element as defined by its key in the parent section or the page object's `elements` definition. + * This is the same name used with the `@` prefix in selector arguments for page object commands that refer to the element. + */ name: string; + + /** + * The locate strategy to be used with `selector` when finding the element within the DOM. + */ locateStrategy: string; + + /** + * A reference to the parent object instance. + * This is the parent section or the page object that contained the definition for this object. + */ parent: EnhancedPageObject; + + /** + * The selector string used to find the element in the DOM. + */ selector: string; } +/** + * [Enhanced Page Object Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-page-object-instances) + * + * Page object module definitions are used to define page object instances when their respective factory functions within the page reference of the standard command API is called. + * ``` + * var myPageObject = browser.page.MyPage(); // defined in MyPage.js module + * ``` + * Every time a factory function like MyPage above is called, a new instance of the page object is instantiated. + */ export interface EnhancedPageObject extends SharedFunctions { + /** + * A reference providing access to the full Nightwatch command API, + * usually known as "client" or "browser" in test cases. + * This is used to access those commands that are not part of the subset of commands within the page object API. + */ api: NightwatchAPI; + + /** + * A map of Element objects (see [Enhanced Element Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-element-instances)) used by element selectors. + */ elements: {[name: string]: EnhancedElementInstance}; + + /** + * The name of the page object as defined by its module name (not including the extension). This is the same name used to access the `page` object factory from the page reference in the command API. + */ name: string; } From 373e1d0fc922f23e6b1d2cee74777a7df121752a Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 14:03:20 -0500 Subject: [PATCH 0088/1121] Fix lint --- types/nightwatch/index.d.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index 1b084e4d66..dc334d11b8 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1850,17 +1850,15 @@ export interface Nightwatch { } /** - * [Enhanced Element Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-element-instances) - * - * Element instances encapsulate the definition used to handle element selectors. - * Generally you won't need to access them directly, - * instead referring to them using their `@`-prefixed names for selector arguments, + * #### [Enhanced Element Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-element-instances) + * Element instances encapsulate the definition used to handle element selectors. + * Generally you won't need to access them directly, + * instead referring to them using their `@`-prefixed names for selector arguments, * but they are available through a page object or section's elements property. */ export interface EnhancedElementInstance { - /** - * The name of the element as defined by its key in the parent section or the page object's `elements` definition. + * The name of the element as defined by its key in the parent section or the page object's `elements` definition. * This is the same name used with the `@` prefix in selector arguments for page object commands that refer to the element. */ name: string; @@ -1871,7 +1869,7 @@ export interface EnhancedElementInstance { locateStrategy: string; /** - * A reference to the parent object instance. + * A reference to the parent object instance. * This is the parent section or the page object that contained the definition for this object. */ parent: EnhancedPageObject; From c45413676b3198fd74f24d01370716398aca4b5e Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Wed, 24 Oct 2018 14:04:38 -0500 Subject: [PATCH 0089/1121] Fix lint --- types/nightwatch/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index dc334d11b8..c96570691f 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1881,8 +1881,7 @@ export interface EnhancedElementInstance { } /** - * [Enhanced Page Object Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-page-object-instances) - * + * #### [Enhanced Page Object Instances](https://github.com/nightwatchjs/nightwatch/wiki/Page-Object-API#enhanced-page-object-instances) * Page object module definitions are used to define page object instances when their respective factory functions within the page reference of the standard command API is called. * ``` * var myPageObject = browser.page.MyPage(); // defined in MyPage.js module @@ -1891,8 +1890,8 @@ export interface EnhancedElementInstance { */ export interface EnhancedPageObject extends SharedFunctions { /** - * A reference providing access to the full Nightwatch command API, - * usually known as "client" or "browser" in test cases. + * A reference providing access to the full Nightwatch command API, + * usually known as "client" or "browser" in test cases. * This is used to access those commands that are not part of the subset of commands within the page object API. */ api: NightwatchAPI; @@ -1903,7 +1902,8 @@ export interface EnhancedPageObject extends SharedFunctions { elements: {[name: string]: EnhancedElementInstance}; /** - * The name of the page object as defined by its module name (not including the extension). This is the same name used to access the `page` object factory from the page reference in the command API. + * The name of the page object as defined by its module name (not including the extension). + * This is the same name used to access the `page` object factory from the page reference in the command API. */ name: string; } From b178a98ffd261b1bcc0c7c220ab8bc46b3f44cf8 Mon Sep 17 00:00:00 2001 From: Dave Cardwell Date: Wed, 24 Oct 2018 20:53:02 -0400 Subject: [PATCH 0090/1121] [browserslist] Add initial types for browserslist --- types/browserslist/browserslist-tests.ts | 22 ++++++++++++++++ types/browserslist/index.d.ts | 33 ++++++++++++++++++++++++ types/browserslist/tsconfig.json | 16 ++++++++++++ types/browserslist/tslint.json | 1 + 4 files changed, 72 insertions(+) create mode 100644 types/browserslist/browserslist-tests.ts create mode 100644 types/browserslist/index.d.ts create mode 100644 types/browserslist/tsconfig.json create mode 100644 types/browserslist/tslint.json diff --git a/types/browserslist/browserslist-tests.ts b/types/browserslist/browserslist-tests.ts new file mode 100644 index 0000000000..d5e88e5b5d --- /dev/null +++ b/types/browserslist/browserslist-tests.ts @@ -0,0 +1,22 @@ +import browserslist from "browserslist"; + +browserslist(); // $ExpectType string[] +browserslist(""); // $ExpectType string[] +browserslist([""]); // $ExpectType string[] + +const opts: browserslist.Options[] = [ + {}, + { path: "" }, + { env: "" }, + { stats: { "": { "": 0 } } }, + { config: "" }, + { ignoreUnknownVersions: false }, + { dangerousExtend: false } +]; +for (const opt of opts) { + browserslist("", opt); // $ExpectType string[] + browserslist([""], opt); // $ExpectType string[] +} + +browserslist.coverage([""]); // $ExpectType number +browserslist.coverage([""], { "": { "": 0 } }); // $ExpectType number diff --git a/types/browserslist/index.d.ts b/types/browserslist/index.d.ts new file mode 100644 index 0000000000..6edcb47ab4 --- /dev/null +++ b/types/browserslist/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for browserslist 4.3 +// Project: https://github.com/browserslist/browserslist#readme +// Definitions by: Dave Cardwell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace browserslist { + interface Browserslist { + (queries?: string | ReadonlyArray, opts?: Options): string[]; + + coverage: (browsers: ReadonlyArray, stats?: Stats) => number; + + clearCaches: () => void; + } + + interface Stats { + [browser: string]: { + [version: string]: number; + }; + } + + interface Options { + path?: string; + env?: string; + stats?: Stats; + config?: string; + ignoreUnknownVersions?: boolean; + dangerousExtend?: boolean; + } +} + +declare var browserslist: browserslist.Browserslist; + +export default browserslist; diff --git a/types/browserslist/tsconfig.json b/types/browserslist/tsconfig.json new file mode 100644 index 0000000000..11138a612f --- /dev/null +++ b/types/browserslist/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "browserslist-tests.ts"] +} diff --git a/types/browserslist/tslint.json b/types/browserslist/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/browserslist/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From c199b3195ae742495cd4b531658eed9a78b1bb82 Mon Sep 17 00:00:00 2001 From: Chris Olivier Date: Thu, 25 Oct 2018 09:25:47 +0200 Subject: [PATCH 0091/1121] Update index.d.ts Corrected return type of jwtDecode from "string | null" to "object | null" --- types/arangodb/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/arangodb/index.d.ts b/types/arangodb/index.d.ts index 76641f5270..5babc4a961 100644 --- a/types/arangodb/index.d.ts +++ b/types/arangodb/index.d.ts @@ -1698,7 +1698,7 @@ declare module "@arangodb/crypto" { key: string | null, token: string, noVerify?: boolean - ): string | null; + ): object | null; function md5(message: string): string; function sha1(message: string): string; function sha224(message: string): string; From 5aae4f767274989ddc605e5a0858fc8d15852c68 Mon Sep 17 00:00:00 2001 From: Dhaifallah Alwadani Date: Fri, 26 Oct 2018 01:01:42 +0300 Subject: [PATCH 0092/1121] Change shown to visible --- types/react-native-popup-dialog/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-native-popup-dialog/index.d.ts b/types/react-native-popup-dialog/index.d.ts index 3ff12802f4..81df144d78 100644 --- a/types/react-native-popup-dialog/index.d.ts +++ b/types/react-native-popup-dialog/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-native-popup-dialog 1.0 +// Type definitions for react-native-popup-dialog 0.16.0 // Project: https://github.com/jacklam718/react-native-popup-dialog/blob/master/README.md // Definitions by: Paito Anderson // connectdotz @@ -55,7 +55,7 @@ export interface PopupDialogProps { dismissOnTouchOutside?: boolean; dismissOnHardwareBackPress?: boolean; haveOverlay?: boolean; - show?: boolean; + visible?: boolean; onShown?: () => void; onDismissed?: () => void; actions?: any[]; From 3971ed019c7dc63bce676fb61009b3a91fe66b65 Mon Sep 17 00:00:00 2001 From: Kevin Gonnord Date: Fri, 26 Oct 2018 13:09:24 +0200 Subject: [PATCH 0093/1121] Add get methods for pageSize --- types/jspdf/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/jspdf/index.d.ts b/types/jspdf/index.d.ts index e393e5fba1..1581870849 100644 --- a/types/jspdf/index.d.ts +++ b/types/jspdf/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for jsPDF v1.1.135 // Project: https://github.com/MrRio/jsPDF -// Definitions by: Amber Schühmacher +// Definitions by: Amber Schühmacher +// Kevin Gonnord // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'jspdf' { @@ -32,7 +33,9 @@ declare module 'jspdf' { 'scaleFactor':number; 'pageSize': { width:number; + getWitdh: () => number; height:number; + getHeight: () => number; }; 'output'(type:any, options:any):any; 'getNumberOfPages'():number; From 5cde7adaa686b32c3302933470303a9c146d4ba9 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Fri, 26 Oct 2018 14:32:37 +0200 Subject: [PATCH 0094/1121] Jasmine: Adds withContext method on Matcher Jasmine 3.3.0 introduced a new method called `withContext` to provide additional context to an expectation. See https://github.com/jasmine/jasmine/blob/master/release_notes/3.3.0.md --- types/jasmine/index.d.ts | 6 ++++++ types/jasmine/jasmine-tests.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index 254714ff94..8ce2b85bb5 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -448,6 +448,12 @@ declare namespace jasmine { toThrowError(message?: string | RegExp): boolean; toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean; + /** + * Add some context for an expect. + * @param message - Additional context to show when the matcher fails + */ + withContext(message: string): Matchers; + not: Matchers; Any: Any; diff --git a/types/jasmine/jasmine-tests.ts b/types/jasmine/jasmine-tests.ts index e96293ced4..11bfbca2b2 100644 --- a/types/jasmine/jasmine-tests.ts +++ b/types/jasmine/jasmine-tests.ts @@ -246,6 +246,12 @@ describe("A spec", () => { }); }); +describe("withContext", () => { + it("can be used after an expectation", () => { + expect(1).withContext('context message').toBe(1); + }); +}); + xdescribe("A spec", () => { var foo: number; From a4a93743a4c5cb4283c9e8b653e450e1bf12430c Mon Sep 17 00:00:00 2001 From: Kevin Gonnord Date: Fri, 26 Oct 2018 14:37:19 +0200 Subject: [PATCH 0095/1121] increase version number --- types/jspdf/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jspdf/index.d.ts b/types/jspdf/index.d.ts index 1581870849..235a08cba0 100644 --- a/types/jspdf/index.d.ts +++ b/types/jspdf/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsPDF v1.1.135 +// Type definitions for jsPDF v1.1.136 // Project: https://github.com/MrRio/jsPDF // Definitions by: Amber Schühmacher // Kevin Gonnord From 782ba71a21044edcf9b4cbfb2369db484693e444 Mon Sep 17 00:00:00 2001 From: Kevin Gonnord Date: Fri, 26 Oct 2018 14:47:41 +0200 Subject: [PATCH 0096/1121] fix getWidth --- types/jspdf/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/jspdf/index.d.ts b/types/jspdf/index.d.ts index 235a08cba0..9324717904 100644 --- a/types/jspdf/index.d.ts +++ b/types/jspdf/index.d.ts @@ -33,7 +33,7 @@ declare module 'jspdf' { 'scaleFactor':number; 'pageSize': { width:number; - getWitdh: () => number; + getWidth: () => number; height:number; getHeight: () => number; }; From 2bf22171c788b20878a79633bd1c994905209663 Mon Sep 17 00:00:00 2001 From: licui Date: Fri, 26 Oct 2018 11:23:48 -0400 Subject: [PATCH 0097/1121] add 34 folder --- .../v34/_v2/api/application/application.d.ts | 223 ++ types/openfin/v34/_v2/api/base.d.ts | 43 + .../v34/_v2/api/clipboard/clipboard.d.ts | 70 + .../v34/_v2/api/clipboard/write-request.d.ts | 12 + .../external-application.d.ts | 36 + types/openfin/v34/_v2/api/fin.d.ts | 27 + types/openfin/v34/_v2/api/frame/frame.d.ts | 51 + .../v34/_v2/api/global-hotkey/index.d.ts | 33 + .../_v2/api/interappbus/channel/channel.d.ts | 31 + .../_v2/api/interappbus/channel/client.d.ts | 6 + .../_v2/api/interappbus/channel/index.d.ts | 33 + .../_v2/api/interappbus/channel/provider.d.ts | 13 + .../v34/_v2/api/interappbus/interappbus.d.ts | 80 + .../_v2/api/notification/notification.d.ts | 71 + .../v34/_v2/api/system/application.d.ts | 4 + .../v34/_v2/api/system/clearCacheOption.d.ts | 6 + types/openfin/v34/_v2/api/system/cookie.d.ts | 8 + .../_v2/api/system/crashReporterOption.d.ts | 4 + .../v34/_v2/api/system/download-asset.d.ts | 18 + .../v34/_v2/api/system/download-preload.d.ts | 8 + types/openfin/v34/_v2/api/system/entity.d.ts | 11 + .../v34/_v2/api/system/external-process.d.ts | 22 + .../v34/_v2/api/system/host-specs.d.ts | 22 + types/openfin/v34/_v2/api/system/log.d.ts | 11 + types/openfin/v34/_v2/api/system/monitor.d.ts | 39 + types/openfin/v34/_v2/api/system/point.d.ts | 8 + types/openfin/v34/_v2/api/system/process.d.ts | 15 + types/openfin/v34/_v2/api/system/proxy.d.ts | 14 + .../v34/_v2/api/system/registry-info.d.ts | 7 + .../v34/_v2/api/system/runtime-info.d.ts | 7 + types/openfin/v34/_v2/api/system/rvm.d.ts | 5 + types/openfin/v34/_v2/api/system/system.d.ts | 475 ++++ types/openfin/v34/_v2/api/system/window.d.ts | 14 + .../v34/_v2/api/window/bounds-changed.d.ts | 14 + types/openfin/v34/_v2/api/window/bounds.d.ts | 9 + .../v34/_v2/api/window/transition.d.ts | 24 + types/openfin/v34/_v2/api/window/window.d.ts | 759 +++++++ .../v34/_v2/environment/environment.d.ts | 10 + .../openfin/v34/_v2/environment/node-env.d.ts | 11 + .../v34/_v2/environment/openfin-env.d.ts | 11 + .../_v2/environment/openfin-renderer-api.d.ts | 6 + types/openfin/v34/_v2/identity.d.ts | 4 + types/openfin/v34/_v2/launcher/launcher.d.ts | 15 + .../openfin/v34/_v2/launcher/nix-launch.d.ts | 14 + types/openfin/v34/_v2/launcher/util.d.ts | 8 + .../openfin/v34/_v2/launcher/win-launch.d.ts | 4 + types/openfin/v34/_v2/main.d.ts | 11 + types/openfin/v34/_v2/of-main.d.ts | 1 + types/openfin/v34/_v2/transport/elipc.d.ts | 13 + .../v34/_v2/transport/port-discovery.d.ts | 17 + .../v34/_v2/transport/transport-errors.d.ts | 17 + .../openfin/v34/_v2/transport/transport.d.ts | 48 + .../openfin/v34/_v2/transport/websocket.d.ts | 14 + types/openfin/v34/_v2/transport/wire.d.ts | 71 + .../v34/_v2/util/normalize-config.d.ts | 3 + types/openfin/v34/_v2/util/promises.d.ts | 5 + types/openfin/v34/_v2/util/ref-counter.d.ts | 7 + types/openfin/v34/index.d.ts | 1907 +++++++++++++++++ types/openfin/v34/openfin-tests.ts | 800 +++++++ types/openfin/v34/tsconfig.json | 81 + types/openfin/v34/tslint.json | 18 + 61 files changed, 5329 insertions(+) create mode 100644 types/openfin/v34/_v2/api/application/application.d.ts create mode 100644 types/openfin/v34/_v2/api/base.d.ts create mode 100644 types/openfin/v34/_v2/api/clipboard/clipboard.d.ts create mode 100644 types/openfin/v34/_v2/api/clipboard/write-request.d.ts create mode 100644 types/openfin/v34/_v2/api/external-application/external-application.d.ts create mode 100644 types/openfin/v34/_v2/api/fin.d.ts create mode 100644 types/openfin/v34/_v2/api/frame/frame.d.ts create mode 100644 types/openfin/v34/_v2/api/global-hotkey/index.d.ts create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/client.d.ts create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/index.d.ts create mode 100644 types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts create mode 100644 types/openfin/v34/_v2/api/interappbus/interappbus.d.ts create mode 100644 types/openfin/v34/_v2/api/notification/notification.d.ts create mode 100644 types/openfin/v34/_v2/api/system/application.d.ts create mode 100644 types/openfin/v34/_v2/api/system/clearCacheOption.d.ts create mode 100644 types/openfin/v34/_v2/api/system/cookie.d.ts create mode 100644 types/openfin/v34/_v2/api/system/crashReporterOption.d.ts create mode 100644 types/openfin/v34/_v2/api/system/download-asset.d.ts create mode 100644 types/openfin/v34/_v2/api/system/download-preload.d.ts create mode 100644 types/openfin/v34/_v2/api/system/entity.d.ts create mode 100644 types/openfin/v34/_v2/api/system/external-process.d.ts create mode 100644 types/openfin/v34/_v2/api/system/host-specs.d.ts create mode 100644 types/openfin/v34/_v2/api/system/log.d.ts create mode 100644 types/openfin/v34/_v2/api/system/monitor.d.ts create mode 100644 types/openfin/v34/_v2/api/system/point.d.ts create mode 100644 types/openfin/v34/_v2/api/system/process.d.ts create mode 100644 types/openfin/v34/_v2/api/system/proxy.d.ts create mode 100644 types/openfin/v34/_v2/api/system/registry-info.d.ts create mode 100644 types/openfin/v34/_v2/api/system/runtime-info.d.ts create mode 100644 types/openfin/v34/_v2/api/system/rvm.d.ts create mode 100644 types/openfin/v34/_v2/api/system/system.d.ts create mode 100644 types/openfin/v34/_v2/api/system/window.d.ts create mode 100644 types/openfin/v34/_v2/api/window/bounds-changed.d.ts create mode 100644 types/openfin/v34/_v2/api/window/bounds.d.ts create mode 100644 types/openfin/v34/_v2/api/window/transition.d.ts create mode 100644 types/openfin/v34/_v2/api/window/window.d.ts create mode 100644 types/openfin/v34/_v2/environment/environment.d.ts create mode 100644 types/openfin/v34/_v2/environment/node-env.d.ts create mode 100644 types/openfin/v34/_v2/environment/openfin-env.d.ts create mode 100644 types/openfin/v34/_v2/environment/openfin-renderer-api.d.ts create mode 100644 types/openfin/v34/_v2/identity.d.ts create mode 100644 types/openfin/v34/_v2/launcher/launcher.d.ts create mode 100644 types/openfin/v34/_v2/launcher/nix-launch.d.ts create mode 100644 types/openfin/v34/_v2/launcher/util.d.ts create mode 100644 types/openfin/v34/_v2/launcher/win-launch.d.ts create mode 100644 types/openfin/v34/_v2/main.d.ts create mode 100644 types/openfin/v34/_v2/of-main.d.ts create mode 100644 types/openfin/v34/_v2/transport/elipc.d.ts create mode 100644 types/openfin/v34/_v2/transport/port-discovery.d.ts create mode 100644 types/openfin/v34/_v2/transport/transport-errors.d.ts create mode 100644 types/openfin/v34/_v2/transport/transport.d.ts create mode 100644 types/openfin/v34/_v2/transport/websocket.d.ts create mode 100644 types/openfin/v34/_v2/transport/wire.d.ts create mode 100644 types/openfin/v34/_v2/util/normalize-config.d.ts create mode 100644 types/openfin/v34/_v2/util/promises.d.ts create mode 100644 types/openfin/v34/_v2/util/ref-counter.d.ts create mode 100644 types/openfin/v34/index.d.ts create mode 100644 types/openfin/v34/openfin-tests.ts create mode 100644 types/openfin/v34/tsconfig.json create mode 100644 types/openfin/v34/tslint.json diff --git a/types/openfin/v34/_v2/api/application/application.d.ts b/types/openfin/v34/_v2/api/application/application.d.ts new file mode 100644 index 0000000000..616501834d --- /dev/null +++ b/types/openfin/v34/_v2/api/application/application.d.ts @@ -0,0 +1,223 @@ +import { EmitterBase, Base, Reply, RuntimeEvent } from '../base'; +import { Identity } from '../../identity'; +import { _Window } from '../window/window'; +import { Point } from '../system/point'; +import { MonitorInfo } from '../system/monitor'; +import Transport from '../../transport/transport'; +import Bounds from '../window/bounds'; +export interface TrayIconClickReply extends Point, Reply<'application', 'tray-icon-clicked'> { + button: number; + monitorInfo: MonitorInfo; +} +export interface ApplicationInfo { + initialOptions: object; + launchMode: string; + manifest: object; + manifestUrl: string; + parentUuid?: string; + runtime: object; +} +export declare class NavigationRejectedReply extends Reply<'window-navigation-rejected', void> { + sourceName: string; + url: string; +} +export interface ConfigInterface { + desktop?: boolean; + startMenu?: boolean; + systemStartup?: boolean; +} +export interface TrayInfo { + bounds: Bounds; + monitorInfo: MonitorInfo; + x: number; + y: number; +} +export default class ApplicationModule extends Base { + /** + * Returns an Application object that represents an existing application. + * @param { Identity } indentity + * @return {Promise.} + * @tutorial Application.wrap + */ + wrap(identity: Identity): Promise; + /** + * Creates a new Application. + * @param {*} appOptions + * @return {Promise.} + * @tutorial Application.create + */ + create(appOptions: any): Promise; + /** + * Returns an Application object that represents the current application + * @return {Promise.} + * @tutorial Application.getCurrent + */ + getCurrent(): Promise; + /** + * Retrieves application's manifest and returns a wrapped application. + * @param {string} manifestUrl - The URL of app's manifest. + * @return {Promise.} + * @tutorial Application.createFromManifest + */ + createFromManifest(manifestUrl: string): Promise; +} +/** + * @classdesc An object representing an application. Allows the developer to create, + * execute, show/close an application as well as listen to application events. + * @class + */ +export declare class Application extends EmitterBase { + identity: Identity; + _manifestUrl?: string; + private window; + constructor(wire: Transport, identity: Identity); + protected runtimeEventComparator: (listener: RuntimeEvent) => boolean; + private windowListFromIdentityList; + /** + * Determines if the application is currently running. + * @return {Promise.} + * @tutorial Application.isRunning + */ + isRunning(): Promise; + /** + * Closes the application and any child windows created by the application. + * @param { boolean } [force = false] Close will be prevented from closing when force is false and + * ‘close-requested’ has been subscribed to for application’s main window. + * @return {Promise.} + * @tutorial Application.close + */ + close(force?: boolean): Promise; + /** + * Retrieves an array of wrapped fin.Windows for each of the application’s child windows. + * @return {Promise.Array.<_Window>} + * @tutorial Application.getChildWindows + */ + getChildWindows(): Promise>; + /** + * Retrieves an array of active window groups for all of the application's windows. Each group is + * represented as an array of wrapped fin.Windows. + * @return {Promise.Array.Array.<_Window>} + * @tutorial Application.getGroups + */ + getGroups(): Promise>>; + /** + * Retrieves the JSON manifest that was used to create the application. Invokes the error callback + * if the application was not created from a manifest. + * @return {Promise.} + * @tutorial Application.getManifest + */ + getManifest(): Promise; + /** + * Retrieves UUID of the application that launches this application. Invokes the error callback + * if the application was created from a manifest. + * @return {Promise.} + * @tutorial Application.getParentUuid + */ + getParentUuid(): Promise; + /** + * Retrieves current application's shortcut configuration. + * @return {Promise.} + * @tutorial Application.getShortcuts + */ + getShortcuts(): Promise; + /** + * Returns an instance of the main Window of the application + * @return {Promise.<_Window>} + * @tutorial Application.getWindow + */ + getWindow(): Promise<_Window>; + /** + * Manually registers a user with the licensing service. The only data sent by this call is userName and appName. + * @param { string } userName - username to be passed to the RVM. + * @param { string } appName - app name to be passed to the RVM. + * @return {Promise.} + * @tutorial Application.registerUser + */ + registerUser(userName: string, appName: string): Promise; + /** + * Removes the application’s icon from the tray. + * @return {Promise.} + * @tutorial Application.removeTrayIcon + */ + removeTrayIcon(): Promise; + /** + * Restarts the application. + * @return {Promise.} + * @tutorial Application.restart + */ + restart(): Promise; + /** + * Runs the application. When the application is created, run must be called. + * @return {Promise.} + * @tutorial Application.run + */ + run(): Promise; + /** + * Instructs the RVM to schedule one restart of the application. + * @return {Promise.} + * @tutorial Application.scheduleRestart + */ + scheduleRestart(): Promise; + /** + * Adds a customizable icon in the system tray and notifies the application when clicked. + * @param { string } iconUrl Image URL to be used as the icon + * @return {Promise.} + * @tutorial Application.setTrayIcon + */ + setTrayIcon(iconUrl: string): Promise; + /** + * Sets new application's shortcut configuration. + * @param { Object } config New application's shortcut configuration. + * @param {Boolean} [config.desktop] - Enable/disable desktop shortcut. + * @param {Boolean} [config.startMenu] - Enable/disable start menu shortcut. + * @param {Boolean} [config.systemStartup] - Enable/disable system startup shortcut. + * @return {Promise.} + * @tutorial Application.setShortcuts + */ + setShortcuts(config: ConfigInterface): Promise; + /** + * @summary Retrieves information about the system tray. + * @desc The only information currently returned is the position and dimensions. + * @return {Promise.} + * @tutorial Application.getTrayIconInfo + */ + getTrayIconInfo(): Promise; + /** + * Closes the application by terminating its process. + * @return {Promise.} + * @tutorial Application.terminate + */ + terminate(): Promise; + /** + * Waits for a hanging application. This method can be called in response to an application + * "not-responding" to allow the application to continue and to generate another "not-responding" + * message after a certain period of time. + * @return {Promise.} + * @ignore + */ + wait(): Promise; + /** + * Retrieves information about the application. + * @return {Promise.} + * @tutorial Application.getInfo + */ + getInfo(): Promise; +} +export interface Application { + on(type: 'closed', listener: (data: Reply<'application', 'closed'>) => void): Promise; + on(type: 'initialized', listener: (data: Reply<'application', 'initialized'>) => void): Promise; + on(type: 'connected', listener: (data: Reply<'application', 'connected'>) => void): Promise; + on(type: 'crashed', listener: (data: Reply<'application', 'crashed'>) => void): Promise; + on(type: 'error', listener: (data: Reply<'application', 'error'>) => void): Promise; + on(type: 'not-responding', listener: (data: Reply<'application', 'not-responding'>) => void): Promise; + on(type: 'out-of-memory', listener: (data: Reply<'application', 'out-of-memory'>) => void): Promise; + on(type: 'responding', listener: (data: Reply<'application', 'responding'>) => void): Promise; + on(type: 'started', listener: (data: Reply<'application', 'started'>) => void): Promise; + on(type: 'run-requested', listener: (data: Reply<'application', 'run-requested'>) => void): Promise; + on(type: 'window-navigation-rejected', listener: (data: NavigationRejectedReply) => void): Promise; + on(type: 'window-created', listener: (data: Reply<'application', 'window-created'>) => void): Promise; + on(type: 'window-closed', listener: (data: Reply<'application', 'window-closed'>) => void): Promise; + on(type: 'tray-icon-clicked', listener: (data: TrayIconClickReply) => void): Promise; + on(type: 'removeListener', listener: (eventType: string) => void): Promise; + on(type: 'newListener', listener: (eventType: string) => void): Promise; +} diff --git a/types/openfin/v34/_v2/api/base.d.ts b/types/openfin/v34/_v2/api/base.d.ts new file mode 100644 index 0000000000..1f17e1f24f --- /dev/null +++ b/types/openfin/v34/_v2/api/base.d.ts @@ -0,0 +1,43 @@ +/// +import Transport, { Message } from '../transport/transport'; +import { Identity } from '../identity'; +import { EventEmitter } from 'events'; +export interface RuntimeEvent extends Identity { + topic: string; + type: string | symbol; +} +export declare class Base { + wire: Transport; + constructor(wire: Transport); + private _topic; + protected topic: string; + readonly me: Identity; + protected isNodeEnvironment: () => boolean; + protected isOpenFinEnvironment: () => boolean; + protected runtimeEventComparator: (listener: RuntimeEvent) => boolean; +} +export declare class EmitterBase extends Base { + protected identity: Identity; + protected emitter: EventEmitter; + listeners: (event: string | symbol) => Function[]; + listenerCount: (type: string | symbol) => number; + constructor(wire: Transport); + emit: (eventName: string | symbol, ...args: any[]) => void; + protected onmessage: (message: Message) => boolean; + protected registerEventListener: (listener: RuntimeEvent) => Promise>; + protected deregisterEventListener: (listener: RuntimeEvent) => Promise>; + on(eventType: string, listener: (...args: any[]) => void): Promise; + addListener: (eventType: string, listener: (...args: any[]) => void) => Promise; + once(eventType: string, listener: (...args: any[]) => void): Promise; + prependListener(eventType: string, listener: (...args: any[]) => void): Promise; + prependOnceListener(eventType: string, listener: (...args: any[]) => void): Promise; + removeListener(eventType: string, listener: (...args: any[]) => void): Promise; + protected deregisterAllListeners: (eventType: string | symbol) => Promise>; + removeAllListeners(eventType?: string): Promise; +} +export declare class Reply implements Identity { + topic: TOPIC; + type: TYPE; + uuid: string; + name?: string; +} diff --git a/types/openfin/v34/_v2/api/clipboard/clipboard.d.ts b/types/openfin/v34/_v2/api/clipboard/clipboard.d.ts new file mode 100644 index 0000000000..11b466dea0 --- /dev/null +++ b/types/openfin/v34/_v2/api/clipboard/clipboard.d.ts @@ -0,0 +1,70 @@ +import { Base } from '../base'; +import { WriteRequestType, WriteAnyRequestType } from './write-request'; +/** + * WriteRequestType interface + * @typedef { Object } WriteRequestType + * @property { string } name The name of the running application + * @property { string } uuid The uuid of the running application + */ +/** + * The Clipboard API allows reading and writing to the clipboard in multiple formats. + * @namespace +*/ +export default class Clipboard extends Base { + /** + * Writes data into the clipboard as plain text + * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typeof + * @return {Promise.} + * @tutorial Clipboard.writeText + */ + writeText(writeObj: WriteRequestType): Promise; + /** + * Read the content of the clipboard as plain text + * @param { string } type Clipboard Type + * @return {Promise.} + * @tutorial Clipboard.readText + */ + readText(type?: string): Promise; + /** + * Writes data into the clipboard as Html + * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typedef + * @return {Promise.} + * @tutorial Clipboard.writeHtml + */ + writeHtml(writeObj: WriteRequestType): Promise; + /** + * Read the content of the clipboard as Html + * @param { string } type Clipboard Type + * @return {Promise.} + * @tutorial Clipboard.readHtml + */ + readHtml(type?: string): Promise; + /** + * Writes data into the clipboard as Rtf + * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typedef + * @return {Promise.} + * @tutorial Clipboard.writeRtf + */ + writeRtf(writeObj: WriteRequestType): Promise; + /** + * Read the content of the clipboard as Rtf + * @param { string } type Clipboard Type + * @return {Promise.} + * @tutorial Clipboard.readRtf + */ + readRtf(type?: string): Promise; + /** + * Writes data into the clipboard + * @param { WriteRequestType } writeObj This object is described in the WriteRequestType typedef + * @return {Promise.} + * @tutorial Clipboard.write + */ + write(writeObj: WriteAnyRequestType): Promise; + /** + * Reads available formats for the clipboard type + * @param { string } type Clipboard Type + * @return {Promise.Array.} + * @tutorial Clipboard.getAvailableFormats + */ + getAvailableFormats(type?: string): Promise>; +} diff --git a/types/openfin/v34/_v2/api/clipboard/write-request.d.ts b/types/openfin/v34/_v2/api/clipboard/write-request.d.ts new file mode 100644 index 0000000000..a2fc5c333e --- /dev/null +++ b/types/openfin/v34/_v2/api/clipboard/write-request.d.ts @@ -0,0 +1,12 @@ +export interface WriteRequestType { + data: string; + type?: string; +} +export interface WriteAnyRequestType { + data: { + text?: string; + html?: string; + rtf?: string; + }; + type?: string; +} diff --git a/types/openfin/v34/_v2/api/external-application/external-application.d.ts b/types/openfin/v34/_v2/api/external-application/external-application.d.ts new file mode 100644 index 0000000000..2d1f46e0f3 --- /dev/null +++ b/types/openfin/v34/_v2/api/external-application/external-application.d.ts @@ -0,0 +1,36 @@ +import { Base, EmitterBase, Reply } from '../base'; +import { Identity } from '../../identity'; +import Transport from '../../transport/transport'; +export interface ExternalApplicationInfo { + parent: Identity; +} +export default class ExternalApplicationModule extends Base { + /** + * Returns an External Application object that represents an existing external application. + * @param {string} uuid The UUID of the external application to be wrapped + * @return {Promise.} + */ + wrap(uuid: string): Promise; +} +/** + * @classdesc An ExternalApplication object representing an application. Allows + * the developer to create, execute, show and close an external application as + * well as listen to application events. + * @class + */ +export declare class ExternalApplication extends EmitterBase { + identity: Identity; + constructor(wire: Transport, identity: Identity); + /** + * Retrieves information about the external application. + * @return {Promise.} + * @tutorial ExternalApplication.getInfo + */ + getInfo(): Promise; +} +export interface ExternalApplication { + on(type: 'connected', listener: (data: Reply<'externalapplication', 'connected'>) => void): Promise; + on(type: 'disconnected', listener: (data: Reply<'externalapplication', 'disconnected'>) => void): Promise; + on(type: 'removeListener', listener: (eventType: string) => void): Promise; + on(type: 'newListener', listener: (eventType: string) => void): Promise; +} diff --git a/types/openfin/v34/_v2/api/fin.d.ts b/types/openfin/v34/_v2/api/fin.d.ts new file mode 100644 index 0000000000..1bec2ffb4f --- /dev/null +++ b/types/openfin/v34/_v2/api/fin.d.ts @@ -0,0 +1,27 @@ +/// +import Transport from '../transport/transport'; +import { EventEmitter } from 'events'; +import System from './system/system'; +import _WindowModule from './window/window'; +import Application from './application/application'; +import InterApplicationBus from './interappbus/interappbus'; +import _NotificationModule from './notification/notification'; +import Clipbpard from './clipboard/clipboard'; +import ExternalApplication from './external-application/external-application'; +import _FrameModule from './frame/frame'; +import GlobalHotkey from './global-hotkey'; +import { Identity } from '../identity'; +export default class Fin extends EventEmitter { + private wire; + System: System; + Window: _WindowModule; + Application: Application; + InterApplicationBus: InterApplicationBus; + Notification: _NotificationModule; + Clipboard: Clipbpard; + ExternalApplication: ExternalApplication; + Frame: _FrameModule; + GlobalHotkey: GlobalHotkey; + readonly me: Identity; + constructor(wire: Transport); +} diff --git a/types/openfin/v34/_v2/api/frame/frame.d.ts b/types/openfin/v34/_v2/api/frame/frame.d.ts new file mode 100644 index 0000000000..4a5ab971de --- /dev/null +++ b/types/openfin/v34/_v2/api/frame/frame.d.ts @@ -0,0 +1,51 @@ +import { Base, EmitterBase } from '../base'; +import { Identity } from '../../identity'; +import Transport from '../../transport/transport'; +export declare type EntityType = 'window' | 'iframe' | 'external connection' | 'unknown'; +export interface FrameInfo { + uuid: string; + name: string; + entityType: EntityType; + parent: Identity; +} +export default class _FrameModule extends Base { + /** + * Gets a reference to the specified frame. The frame does not have to exist + * @param {string} uuid - uuid of the frame you want to wrap + * @param {string} name - name of the frame you want to wrap + * @return {Promise.<_Frame>} + */ + wrap(uuid: string, name: string): Promise<_Frame>; + /** + * Get a reference to the current frame + * @return {Promise.<_Frame>} + */ + getCurrent(): Promise<_Frame>; +} +/** + * @classdesc Represents a way to interact with `iframes`. Facilitates discovery of current context + * (iframe or main window) as well as the ability to listen for frame-specific events. + * @class + * @alias Frame + */ +export declare class _Frame extends EmitterBase { + identity: Identity; + constructor(wire: Transport, identity: Identity); + /** + * Returns a frame info object for the represented frame + * @return {Promise.} + * @tutorial Frame.getInfo + */ + getInfo(): Promise; + /** + * Returns a frame info object representing the window that the referenced iframe is + * currently embedded in + * @return {Promise.} + * @tutorial Frame.getParentWindow + */ + getParentWindow(): Promise; +} +export interface _Frame { + on(type: 'connected', listener: (eventType: string) => void): Promise; + on(type: 'disconnected', listener: (eventType: string) => void): Promise; +} diff --git a/types/openfin/v34/_v2/api/global-hotkey/index.d.ts b/types/openfin/v34/_v2/api/global-hotkey/index.d.ts new file mode 100644 index 0000000000..148ddff7e9 --- /dev/null +++ b/types/openfin/v34/_v2/api/global-hotkey/index.d.ts @@ -0,0 +1,33 @@ +import { EmitterBase } from '../base'; +import Transport from '../../transport/transport'; +/** + * The GlobalHotkey module can register/unregister a global hotkeys. + * @namespace + */ +export default class GlobalHotkey extends EmitterBase { + constructor(wire: Transport); + /** + * Registers a global hotkey with the operating system. + * @return {Promise.} + * @tutorial GlobalHotkey.register + */ + register(hotkey: string, listener: (...args: any[]) => void): Promise; + /** + * Unregisters a global hotkey with the operating system. + * @return {Promise.} + * @tutorial GlobalHotkey.unregister + */ + unregister(hotkey: string): Promise; + /** + * Unregisters all global hotkeys for the current application. + * @return {Promise.} + * @tutorial GlobalHotkey.unregisterAll + */ + unregisterAll(): Promise; + /** + * Checks if a given hotkey has been registered + * @return {Promise.} + * @tutorial GlobalHotkey.isRegistered + */ + isRegistered(hotkey: string): Promise; +} diff --git a/types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts new file mode 100644 index 0000000000..1c9a502e12 --- /dev/null +++ b/types/openfin/v34/_v2/api/interappbus/channel/channel.d.ts @@ -0,0 +1,31 @@ +import { Identity } from '../../../identity'; +import Transport, { Message } from '../../../transport/transport'; +export interface ProviderIdentity extends Identity { + channelId: string; + isExternal?: boolean; + channelName: string; +} +export declare type Action = (() => any) | ((payload: any) => any) | ((payload: any, id: ProviderIdentity) => any); +export declare type Middleware = (() => any) | ((action: string) => any) | ((action: string, payload: any) => any) | ((action: string, payload: any, id: ProviderIdentity) => any); +export interface ChannelMessagePayload extends Identity { + action: string; + payload: any; +} +export declare class ChannelBase { + protected subscriptions: any; + defaultAction: (action?: string, payload?: any, senderIdentity?: ProviderIdentity) => any; + private preAction; + private postAction; + private errorMiddleware; + private defaultSet; + protected send: (to: Identity, action: string, payload: any) => Promise>; + protected providerIdentity: ProviderIdentity; + constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']); + processAction(action: string, payload: any, senderIdentity: ProviderIdentity): Promise; + beforeAction(func: Action): void; + onError(func: (e: any, action: string, id: Identity) => any): void; + afterAction(func: Action): void; + remove(action: string): void; + setDefaultAction(func: (action?: string, payload?: any, senderIdentity?: ProviderIdentity) => any): void; + register(topic: string, listener: Action): boolean; +} diff --git a/types/openfin/v34/_v2/api/interappbus/channel/client.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/client.d.ts new file mode 100644 index 0000000000..d1c128a349 --- /dev/null +++ b/types/openfin/v34/_v2/api/interappbus/channel/client.d.ts @@ -0,0 +1,6 @@ +import { ChannelBase, ProviderIdentity } from './channel'; +import Transport from '../../../transport/transport'; +export declare class ChannelClient extends ChannelBase { + constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']); + dispatch(action: string, payload?: any): Promise; +} diff --git a/types/openfin/v34/_v2/api/interappbus/channel/index.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/index.d.ts new file mode 100644 index 0000000000..1297d2c5ea --- /dev/null +++ b/types/openfin/v34/_v2/api/interappbus/channel/index.d.ts @@ -0,0 +1,33 @@ +import { ChannelClient } from './client'; +import { Identity } from '../../../identity'; +import { ChannelProvider } from './provider'; +import { EmitterBase } from '../../base'; +import Transport, { Message, Payload } from '../../../transport/transport'; +import { ProviderIdentity } from './channel'; +export interface Options { + wait?: boolean; + uuid: string; + name?: string; + payload?: any; +} +export interface ChannelPayload { + payload: Payload; +} +export interface ChannelMessage { + senderIdentity: Identity; + ackToSender: any; + providerIdentity: Identity; + connectAction: boolean; +} +export declare class Channel extends EmitterBase { + private channelMap; + constructor(wire: Transport); + getAllChannels(): Promise; + onChannelConnect(listener: Function): Promise; + onChannelDisconnect(listener: Function): Promise; + connect(options: Options): Promise; + create(channelName?: string): Promise; + onmessage: (msg: Message) => boolean; + private processChannelMessage; + private processChannelConnection; +} diff --git a/types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts b/types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts new file mode 100644 index 0000000000..a869928ac2 --- /dev/null +++ b/types/openfin/v34/_v2/api/interappbus/channel/provider.d.ts @@ -0,0 +1,13 @@ +import { ChannelBase, ProviderIdentity } from './channel'; +import Transport from '../../../transport/transport'; +export declare type ConnectionListener = (adapterIdentity: ProviderIdentity, connectionMessage?: any) => any; +export declare class ChannelProvider extends ChannelBase { + private connectListener; + private disconnectListener; + connections: ProviderIdentity[]; + constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']); + dispatch(to: ProviderIdentity, action: string, payload: any): Promise; + processConnection(senderId: ProviderIdentity, payload: any): Promise; + publish(action: string, payload: any): Promise[]; + onConnection(listener: ConnectionListener): void; +} diff --git a/types/openfin/v34/_v2/api/interappbus/interappbus.d.ts b/types/openfin/v34/_v2/api/interappbus/interappbus.d.ts new file mode 100644 index 0000000000..48aaf7430c --- /dev/null +++ b/types/openfin/v34/_v2/api/interappbus/interappbus.d.ts @@ -0,0 +1,80 @@ +/// +import { Base } from '../base'; +import { Identity } from '../../identity'; +import Transport, { Message } from '../../transport/transport'; +import { EventEmitter } from 'events'; +import { Channel } from './channel/index'; +/** + * A messaging bus that allows for pub/sub messaging between different applications. + * @namespace +*/ +export default class InterApplicationBus extends Base { + Channel: Channel; + events: { + subscriberAdded: string; + subscriberRemoved: string; + }; + private refCounter; + protected emitter: EventEmitter; + on: any; + removeAllListeners: any; + constructor(wire: Transport); + /** + * Publishes a message to all applications running on OpenFin Runtime that + * are subscribed to the specified topic. + * @param { string } topic The topic on which the message is sent + * @param { any } message The message to be published. Can be either a primitive + * data type (string, number, or boolean) or composite data type (object, array) + * that is composed of other primitive or composite data types + * @return {Promise.} + * @tutorial InterApplicationBus.publish + */ + publish(topic: string, message: any): Promise; + /** + * Sends a message to a specific application on a specific topic. + * @param { object } destination The uuid of the application to which the message is sent + * @param { string } topic The topic on which the message is sent + * @param { any } message The message to be sent. Can be either a primitive data + * type (string, number, or boolean) or composite data type (object, array) that + * is composed of other primitive or composite data types + * @return {Promise.} + * @tutorial InterApplicationBus.send + */ + send(destination: Identity, topic: string, message: any): Promise; + /** + * Subscribes to messages from the specified application on the specified topic. + * If the subscription is for a uuid, [name], topic combination that has already + * been published to upon subscription you will receive the last 20 missed messages + * in the order they were published. + * @param { Identity } source This object is described in the Identity in the typedef + * @param { string } topic The topic on which the message is sent + * @param { function } listener A function that is called when a message has + * been received. It is passed the message, uuid and name of the sending application. + * The message can be either a primitive data type (string, number, or boolean) or + * composite data type (object, array) that is composed of other primitive or composite + * data types + * @return {Promise.} + * @tutorial InterApplicationBus.subcribe + */ + subscribe(source: Identity, topic: string, listener: any): Promise; + /** + * Unsubscribes to messages from the specified application on the specified topic. + * @param { Identity } source This object is described in the Identity in the typedef + * @param { string } topic The topic on which the message is sent + * @param { function } listener A callback previously registered with subscribe() + * @return {Promise.} + * @tutorial InterApplicationBus.unsubscribe + */ + unsubscribe(source: Identity, topic: string, listener: any): Promise; + private processMessage; + private emitSubscriverEvent; + protected createSubscriptionKey(uuid: string, name: string, topic: string): string; + protected onmessage(message: Message): boolean; +} +export declare class InterAppPayload { + sourceUuid: string; + sourceWindowName: string; + topic: string; + destinationUuid?: string; + message?: any; +} diff --git a/types/openfin/v34/_v2/api/notification/notification.d.ts b/types/openfin/v34/_v2/api/notification/notification.d.ts new file mode 100644 index 0000000000..8deec180ba --- /dev/null +++ b/types/openfin/v34/_v2/api/notification/notification.d.ts @@ -0,0 +1,71 @@ +import { Base, EmitterBase } from '../base'; +import { Identity } from '../../identity'; +import Transport from '../../transport/transport'; +export declare class NotificationOptions { + url: string; + message: string; + timeout: string | number; + notificationId: number; + uuidOfProxiedApp: string; + ignoreMouseOver: boolean; + constructor(options: any, identity: Identity, notificationId: number); +} +export interface NotificationCallback { + message?: any; +} +/** + * @classdesc A Notification object represents a window on OpenFin Runtime which + * is shown briefly to the user on the bottom-right corner of the primary monitor. + * A notification is typically used to alert the user of some important event which + * requires his or her attention. Notifications are a child or your application that + * are controlled by the runtime. + * @class + * @alias Notification + */ +export declare class _Notification extends EmitterBase { + private listenerList; + private unhookAllListeners; + private buildLocalPayload; + protected options: NotificationOptions; + protected generalListener: (msg: any) => void; + protected notificationId: number; + protected onmessage: (message: any) => boolean; + constructor(wire: Transport, options: NotificationOptions); + url: string; + timeout: number | string; + message: any; + /** + * Invoked when the notification is shown + * @return {Promise.} + * @tutorial Notification.show + */ + show(): Promise; + /** + * Sends a message to the notification. + * @param { any } message The message to be sent to the notification. + * Can be either a primitive data type (string, number, or boolean) + * or composite data type (object, array) that is composed of other + * primitive or composite data types + * @return {Promise.} + * @tutorial Notification.sendMessage + */ + sendMessage(message: any): Promise; + /** + * Closes the notification + * @return {Promise.} + * @tutorial Notification.close + */ + close(): Promise; +} +export default class _NotificationModule extends Base { + private nextNoteId; + private genNoteId; + events: { + show: string; + close: string; + error: string; + click: string; + message: string; + }; + create(options: any): _Notification; +} diff --git a/types/openfin/v34/_v2/api/system/application.d.ts b/types/openfin/v34/_v2/api/system/application.d.ts new file mode 100644 index 0000000000..9d7ea09b67 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/application.d.ts @@ -0,0 +1,4 @@ +export interface ApplicationInfo { + isRunning: boolean; + uuid: string; +} diff --git a/types/openfin/v34/_v2/api/system/clearCacheOption.d.ts b/types/openfin/v34/_v2/api/system/clearCacheOption.d.ts new file mode 100644 index 0000000000..6bae8116b7 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/clearCacheOption.d.ts @@ -0,0 +1,6 @@ +export interface ClearCacheOption { + appcache?: boolean; + cache?: boolean; + cookies?: boolean; + localStorage?: boolean; +} diff --git a/types/openfin/v34/_v2/api/system/cookie.d.ts b/types/openfin/v34/_v2/api/system/cookie.d.ts new file mode 100644 index 0000000000..1d229232c6 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/cookie.d.ts @@ -0,0 +1,8 @@ +export interface CookieInfo { + name: string; + domain: string; + path: string; +} +export interface CookieOption { + name: string; +} diff --git a/types/openfin/v34/_v2/api/system/crashReporterOption.d.ts b/types/openfin/v34/_v2/api/system/crashReporterOption.d.ts new file mode 100644 index 0000000000..7d512fdd7b --- /dev/null +++ b/types/openfin/v34/_v2/api/system/crashReporterOption.d.ts @@ -0,0 +1,4 @@ +export interface CrashReporterOption { + diagnosticMode: boolean; + isRunning?: boolean; +} diff --git a/types/openfin/v34/_v2/api/system/download-asset.d.ts b/types/openfin/v34/_v2/api/system/download-asset.d.ts new file mode 100644 index 0000000000..be513f5f0e --- /dev/null +++ b/types/openfin/v34/_v2/api/system/download-asset.d.ts @@ -0,0 +1,18 @@ +export interface AppAssetInfo { + src: string; + alias: string; + version: string; + target?: string; + args?: string; + mandatory?: boolean; +} +export interface RuntimeDownloadOptions { + version: string; +} +export interface AppAssetRequest { + alias: string; +} +export interface RuntimeDownloadProgress { + downloadedBytes: number; + totalBytes: number; +} diff --git a/types/openfin/v34/_v2/api/system/download-preload.d.ts b/types/openfin/v34/_v2/api/system/download-preload.d.ts new file mode 100644 index 0000000000..a7e635bcb8 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/download-preload.d.ts @@ -0,0 +1,8 @@ +export interface DownloadPreloadOption { + url: string; +} +export interface DownloadPreloadInfo { + success: boolean; + url?: string; + error: string; +} diff --git a/types/openfin/v34/_v2/api/system/entity.d.ts b/types/openfin/v34/_v2/api/system/entity.d.ts new file mode 100644 index 0000000000..50011a64f3 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/entity.d.ts @@ -0,0 +1,11 @@ +import { Identity } from '../../identity'; +export interface Entity { + type: string; + uuid: string; +} +export interface EntityInfo { + name: string; + uuid: string; + parent: Identity; + entityType: string; +} diff --git a/types/openfin/v34/_v2/api/system/external-process.d.ts b/types/openfin/v34/_v2/api/system/external-process.d.ts new file mode 100644 index 0000000000..8a68f1eae3 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/external-process.d.ts @@ -0,0 +1,22 @@ +export interface ExternalProcessRequestType { + path: string; + arguments: string; + listener: LaunchExternalProcessListener; +} +export interface ExitCode { + topic: string; + uuid: string; + exitCode: number; +} +export interface LaunchExternalProcessListener { + (code: ExitCode): void; +} +export interface TerminateExternalRequestType { + uuid: string; + timeout: number; + killTree: boolean; +} +export interface ExternalConnection { + token: string; + uuid: string; +} diff --git a/types/openfin/v34/_v2/api/system/host-specs.d.ts b/types/openfin/v34/_v2/api/system/host-specs.d.ts new file mode 100644 index 0000000000..2c5a134aea --- /dev/null +++ b/types/openfin/v34/_v2/api/system/host-specs.d.ts @@ -0,0 +1,22 @@ +export interface Time { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; +} +export interface CpuInfo { + model: string; + speed: number; + times: Time; +} +export interface GpuInfo { + name: string; +} +export interface HostSpecs { + cpu: CpuInfo[]; + memory: number; + arch: string; + name: string; + gpu: GpuInfo; +} diff --git a/types/openfin/v34/_v2/api/system/log.d.ts b/types/openfin/v34/_v2/api/system/log.d.ts new file mode 100644 index 0000000000..9b03b28c57 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/log.d.ts @@ -0,0 +1,11 @@ +export interface GetLogRequestType { + name: string; + endFile?: string; + sizeLimit?: number; +} +export interface LogInfo { + name: string; + size: number; + date: string; +} +export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal'; diff --git a/types/openfin/v34/_v2/api/system/monitor.d.ts b/types/openfin/v34/_v2/api/system/monitor.d.ts new file mode 100644 index 0000000000..ea4aed799c --- /dev/null +++ b/types/openfin/v34/_v2/api/system/monitor.d.ts @@ -0,0 +1,39 @@ +import { Point } from './point'; +export interface MonitorInfo { + deviceScaleFactor: number; + dpi: Point; + nonPrimaryMonitors: Array; + primaryMonitor: MonitorDetails; + reason: string; + taskBar: TaskBar; + virtualScreen: DipRect; +} +export interface MonitorDetails { + available: DipScaleRects; + availableRect: Rect; + deviceId: string; + displayDeviceActive: boolean; + deviceScaleFactor: number; + monitorRect: Rect; + name: number; + dpi: Point; + monitor: DipScaleRects; +} +export interface Rect { + bottom: number; + left: number; + right: number; + top: number; +} +export interface DipRect extends Rect { + dipRect: Rect; + scaledRect: Rect; +} +export interface DipScaleRects { + dipRect: Rect; + scaledRect: Rect; +} +export interface TaskBar extends DipScaleRects { + edge: string; + rect: Rect; +} diff --git a/types/openfin/v34/_v2/api/system/point.d.ts b/types/openfin/v34/_v2/api/system/point.d.ts new file mode 100644 index 0000000000..b9830ce514 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/point.d.ts @@ -0,0 +1,8 @@ +export interface Point { + x: number; + y: number; +} +export interface PointTopLeft { + top: number; + left: number; +} diff --git a/types/openfin/v34/_v2/api/system/process.d.ts b/types/openfin/v34/_v2/api/system/process.d.ts new file mode 100644 index 0000000000..8a513ceecd --- /dev/null +++ b/types/openfin/v34/_v2/api/system/process.d.ts @@ -0,0 +1,15 @@ +export interface ProcessInfo { + cpuUsage: number; + name: string; + nonPagedPoolUsage: number; + pageFaultCount: number; + pagedPoolUsage: number; + pagefileUsage: number; + peakNonPagedPoolUsage: number; + peakPagedPoolUsage: number; + peakPagefileUsage: number; + peakWorkingSetSize: number; + processId: number; + uuid: string; + workingSetSize: number; +} diff --git a/types/openfin/v34/_v2/api/system/proxy.d.ts b/types/openfin/v34/_v2/api/system/proxy.d.ts new file mode 100644 index 0000000000..597afa6548 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/proxy.d.ts @@ -0,0 +1,14 @@ +export interface ProxyInfo { + config: ProxyConfig; + system: { + autoConfigUrl: string; + bypass: ''; + enabled: boolean; + proxy: string; + }; +} +export interface ProxyConfig { + proxyAddress: string; + proxyPort: number; + type: string; +} diff --git a/types/openfin/v34/_v2/api/system/registry-info.d.ts b/types/openfin/v34/_v2/api/system/registry-info.d.ts new file mode 100644 index 0000000000..a48ed34959 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/registry-info.d.ts @@ -0,0 +1,7 @@ +export interface RegistryInfo { + data: any; + rootKey: string; + subkey: string; + type: string; + value: string; +} diff --git a/types/openfin/v34/_v2/api/system/runtime-info.d.ts b/types/openfin/v34/_v2/api/system/runtime-info.d.ts new file mode 100644 index 0000000000..1508f87ef3 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/runtime-info.d.ts @@ -0,0 +1,7 @@ +export interface RuntimeInfo { + architecture: string; + manifestUrl: string; + port: number; + securityRealm?: string; + version: string; +} diff --git a/types/openfin/v34/_v2/api/system/rvm.d.ts b/types/openfin/v34/_v2/api/system/rvm.d.ts new file mode 100644 index 0000000000..42fc0b94db --- /dev/null +++ b/types/openfin/v34/_v2/api/system/rvm.d.ts @@ -0,0 +1,5 @@ +export interface RVMInfo { + action: string; + 'start-time': string; + version: string; +} diff --git a/types/openfin/v34/_v2/api/system/system.d.ts b/types/openfin/v34/_v2/api/system/system.d.ts new file mode 100644 index 0000000000..8c0bc7d3b6 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/system.d.ts @@ -0,0 +1,475 @@ +import { EmitterBase } from '../base'; +import { ApplicationInfo } from './application'; +import { WindowInfo } from './window'; +import { Identity } from '../../identity'; +import { MonitorInfo } from './monitor'; +import { PointTopLeft } from './point'; +import { GetLogRequestType, LogInfo, LogLevel } from './log'; +import { ProxyInfo, ProxyConfig } from './proxy'; +import { ProcessInfo } from './process'; +import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './download-asset'; +import { RVMInfo } from './rvm'; +import { RuntimeInfo } from './runtime-info'; +import { Entity, EntityInfo } from './entity'; +import { HostSpecs } from './host-specs'; +import { ExternalProcessRequestType, TerminateExternalRequestType, ExternalConnection } from './external-process'; +import Transport from '../../transport/transport'; +import { CookieInfo, CookieOption } from './cookie'; +import { RegistryInfo } from './registry-info'; +import { DownloadPreloadOption, DownloadPreloadInfo } from './download-preload'; +import { ClearCacheOption } from './clearCacheOption'; +import { CrashReporterOption } from './crashReporterOption'; +/** + * AppAssetInfo interface + * @typedef { Object } AppAssetInfo + * @property { string } src The URL to a zip file containing the package files (executables, dlls, etc…) + * @property { string } alias The name of the asset + * @property { string } version The version of the package + * @property { string } target Specify default executable to launch. This option can be overridden in launchExternalProcess + * @property { args } args The default command line arguments for the aforementioned target. + * @property { boolean } mandatory When set to true, the app will fail to load if the asset cannot be downloaded. + * When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true) + */ +/** + * AppAssetRequest interface + * @typedef { Object } AppAssetRequest + * @property { string } alias The name of the asset + */ +/** + * CookieInfo interface + * @typedef { Object } CookieInfo + * @property { string } name The name of the cookie + * @property { string } domain The domain of the cookie + * @property { string } path The path of the cookie + */ +/** + * CookieOption interface + * @typedef { Object } CookieOption + * @property { string } name The name of the cookie + */ +/** + * ExternalConnection interface + * @typedef { Object } ExternalConnection + * @property { string } token The token to broker an external connection + * @property { string } uuid The uuid of the external connection + */ +/** +* ExternalProcessRequestType interface +* @typedef { Object } ExternalProcessRequestType +* @property { string } path The file path to where the running application resides +* @property { string } arguments The argument passed to the running application +* @property { Object } listener This is described in the {LaunchExternalProcessListner} type definition +*/ +/** + * Entity interface + * @typedef { Object } Entity + * @property { string } type The type of the entity + * @property { string } uuid The uuid of the entity + */ +/** + * EntityInfo interface + * @typedef { Object } EntityInfo + * @property { string } name The name of the entity + * @property { string } uuid The uuid of the entity + * @property { Identity } parent The parent of the entity + * @property { string } entityType The type of the entity + */ +/** +* GetLogRequestType interface +* @typedef { Object } GetLogRequestType +* @property { string } name The name of the running application +* @property { number } endFile The file length of the log file +* @property { number } sizeLimit The set size limit of the log file +*/ +/** + * Identity interface + * @typedef { Object } Identity + * @property { string } name The name of the application + * @property { string } uuid The uuid of the application + */ +/** + * @typedef { verbose | info | warning | error | fatal } LogLevel + * @summary Log verbosity levels. + * @desc Describes the minimum level (inclusive) above which logs will be written + * + * @property { string } verbose all logs written + * @property { string } info info and above + * @property { string } warning warning and above + * @property { string } error error and above + * @property { string } fatal fatal only, indicates a crash is imminent + */ +/** + * ProxyConfig interface + * @typedef { Object } ProxyConfig + * @property { numder } proxyPort The port number of the running application + * @property { string } proxyAddress The address of the running application + * @property { string } type + */ +/** + * RegistryInfo interface + * @typedef { Object } RegistryInfo + * @property { any } data The registry data + * @property { string } rootKey The registry root key + * @property { string } subkey The registry key + * @property { string } type The registry type + * @property { string } value The registry value name + */ +/** + * RuntimeDownloadOptions interface + * @typedef { Object } RuntimeDownloadOptions + * @desc These are the options object required by the downloadRuntime function. + * @property { string } version The given version to download + */ +/** + * TerminateExternalRequestType interface + * @typedef { Object } TerminateExternalRequestType + * @property { string } uuid The uuid of the running application + * @property { number } timeout Time out period before the running application terminates + * @property { boolean } killtree Value to terminate the running application + */ +/** + * DownloadPreloadOption interface + * @typedef { Object } DownloadPreloadOption + * @desc These are the options object required by the downloadPreloadScripts function + * @property { string } url url to the preload script + */ +/** + * DownloadPreloadInfo interface + * @typedef { Object } DownloadPreloadInfo + * @desc downloadPreloadScripts function return value + * @property { string } url url to the preload script + * @property { string } error error during preload script acquisition + * @property { boolean } succeess download operation success + */ +/** + * @typedef { Object } ClearCacheOption + * @summary Clear cache options. + * @desc These are the options required by the clearCache function. + * + * @property {boolean} appcache html5 application cache + * @property {boolean} cache browser data cache for html files and images + * @property {boolean} cookies browser cookies + * @property {boolean} localStorage browser data that can be used across sessions + */ +/** +* CrashReporterOption interface +* @typedef { Object } CrashReporterOption +* @property { boolean } diagnosticMode In diagnostic mode the crash reporter will send diagnostic logs to +* the OpenFin reporting service on runtime shutdown +* @property { boolean } isRunning check if it's running +*/ +/** + * An object representing the core of OpenFin Runtime. Allows the developer + * to perform system-level actions, such as accessing logs, viewing processes, + * clearing the cache and exiting the runtime. + * @namespace + */ +export default class System extends EmitterBase { + constructor(wire: Transport); + /** + * Returns the version of the runtime. The version contains the major, minor, + * build and revision numbers. + * @return {Promise.} + * @tutorial System.getVersion + */ + getVersion(): Promise; + /** + * Clears cached data containing application resource + * files (images, HTML, JavaScript files), cookies, and items stored in the + * Local Storage. + * @param { ClearCacheOption } options - See tutorial for more details. + * @return {Promise.} + * @tutorial System.clearCache + */ + clearCache(options: ClearCacheOption): Promise; + /** + * Clears all cached data when OpenFin Runtime exits. + * @return {Promise.} + * @tutorial System.deleteCacheOnExit + */ + deleteCacheOnExit(): Promise; + /** + * Exits the Runtime. + * @return {Promise.} + * @tutorial System.exit + */ + exit(): Promise; + /** + * Writes any unwritten cookies data to disk. + * @return {Promise.} + * @tutorial System.flushCookieStore + */ + flushCookieStore(): Promise; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + * @return {Promise.Array.} + * @tutorial System.getAllWindows + */ + getAllWindows(): Promise>; + /** + * Retrieves an array of data for all applications. + * @return {Promise.Array.} + * @tutorial System.getAllApplications + */ + getAllApplications(): Promise>; + /** + * Retrieves the command line argument string that started OpenFin Runtime. + * @return {Promise.} + * @tutorial System.getCommandLineArguments + */ + getCommandLineArguments(): Promise; + /** + * Get the current state of the crash reporter. + * @return {Promise.} + * @tutorial System.getCrashReporterState + */ + getCrashReporterState(): Promise; + /** + * Returns a unique identifier (UUID) for the machine (SHA256 hash of the system's MAC address). + * This call will return the same value on subsequent calls on the same machine(host). + * The values will be different on different machines, and should be considered globally unique. + * @return {Promise.} + * @tutorial System.getDeviceId + */ + getDeviceId(): Promise; + /** + * Start the crash reporter for the browser process if not already running. + * You can optionally specify `diagnosticMode` to have the logs sent to + * OpenFin on runtime close + * + * @param { CrashReporterOption } options - configure crash reporter + * @return {Promise.} + * @tutorial System.startCrashReporter + */ + startCrashReporter(options: CrashReporterOption): Promise; + /** + * Returns a hex encoded hash of the mac address and the currently logged in user name + * @return {Promise.} + * @tutorial System.getDeviceUserId + */ + getDeviceUserId(): Promise; + /** + * Retrieves a frame info object for the uuid and name passed in + * @param { string } uuid - The UUID of the target. + * @param { string } name - The name of the target. + * @return {Promise.} + * @tutorial System.getEntityInfo + */ + getEntityInfo(uuid: string, name: string): Promise; + /** + * Gets the value of a given environment variable on the computer on which the runtime is installed + * @return {Promise.} + * @tutorial System.getEnvironmentVariable + */ + getEnvironmentVariable(envName: string): Promise; + /** + * Get current focused window. + * @return {Promise.} + * @tutorial System.getFocusedWindow + */ + getFocusedWindow(): Promise; + /** + * Retrieves the contents of the log with the specified filename. + * @param { GetLogRequestType } options A object that id defined by the GetLogRequestType interface + * @return {Promise.} + * @tutorial System.getLog + */ + getLog(options: GetLogRequestType): Promise; + /** + * Returns the minimum (inclusive) logging level that is currently being written to the log. + * @return {Promise.} + * @tutorial System.getMinLogLevel + */ + getMinLogLevel(): Promise; + /** + * Retrieves an array containing information for each log file. + * @return {Promise.Array} + * @tutorial System.getLogList + */ + getLogList(): Promise>; + /** + * Retrieves an object that contains data about the monitor setup of the + * computer that the runtime is running on. + * @return {Promise.} + * @tutorial System.getMonitorInfo + */ + getMonitorInfo(): Promise; + /** + * Returns the mouse in virtual screen coordinates (left, top). + * @return {Promise.} + * @tutorial System.getMousePosition + */ + getMousePosition(): Promise; + /** + * Retrieves an array of all of the runtime processes that are currently + * running. Each element in the array is an object containing the uuid + * and the name of the application to which the process belongs. + * @return {Promise.Array.} + * @tutorial System.getProcessList + */ + getProcessList(): Promise>; + /** + * Retrieves the Proxy settings. + * @return {Promise.} + * @tutorial System.getProxySettings + */ + getProxySettings(): Promise; + /** + * Returns information about the running Runtime in an object. + * @return {Promise.} + * @tutorial System.getRuntimeInfo + */ + getRuntimeInfo(): Promise; + /** + * Returns information about the running RVM in an object. + * @return {Promise.} + * @tutorial System.getRvmInfo + */ + getRvmInfo(): Promise; + /** + * Retrieves system information. + * @return {Promise.} + * @tutorial System.getHostSpecs + */ + getHostSpecs(): Promise; + /** + * Runs an executable or batch file. + * @param { ExternalProcessRequestType } options A object that is defined in the ExternalProcessRequestType interface + * @return {Promise.} + * @tutorial System.launchExternalProcess + */ + launchExternalProcess(options: ExternalProcessRequestType): Promise; + /** + * Monitors a running process. + * @param { number } pid See tutorial for more details + * @return {Promise.} + * @tutorial System.monitorExternalProcess + */ + monitorExternalProcess(pid: number): Promise; + /** + * Writes the passed message into both the log file and the console. + * @param { string } level The log level for the entry. Can be either "info", "warning" or "error" + * @param { string } message The log message text + * @return {Promise.} + * @tutorial System.log + */ + log(level: string, message: string): Promise; + /** + * Opens the passed URL in the default web browser. + * @param { string } url The URL to open + * @return {Promise.} + * @tutorial System.openUrlWithBrowser + */ + openUrlWithBrowser(url: string): Promise; + /** + * Removes the process entry for the passed UUID obtained from a prior call + * of fin.System.launchExternalProcess(). + * @param { string } uuid The UUID for a process obtained from a prior call to fin.desktop.System.launchExternalProcess() + * @return {Promise.} + * @tutorial System.releaseExternalProcess + */ + releaseExternalProcess(uuid: string): Promise; + /** + * Shows the Chromium Developer Tools for the specified window + * @param { Identity } identity This is a object that is defined by the Identity interface + * @return {Promise.} + * @tutorial System.showDeveloperTools + */ + showDeveloperTools(identity: Identity): Promise; + /** + * Attempt to close an external process. The process will be terminated if it + * has not closed after the elapsed timeout in milliseconds. + * @param { TerminateExternalRequestType } options A object defined in the TerminateExternalRequestType interface + * @return {Promise.} + * @tutorial System.terminateExternalProcess + */ + terminateExternalProcess(options: TerminateExternalRequestType): Promise; + /** + * Update the OpenFin Runtime Proxy settings. + * @param { ProxyConfig } options A config object defined in the ProxyConfig interface + * @return {Promise.} + * @tutorial System.updateProxySettings + */ + updateProxySettings(options: ProxyConfig): Promise; + /** + * Downloads the given application asset + * @param { AppAssetInfo } appAsset App asset object + * @return {Promise.} + * @tutorial System.downloadAsset + */ + downloadAsset(appAsset: AppAssetInfo, progressListener: (progress: RuntimeDownloadProgress) => void): Promise; + /** + * Downloads a version of the runtime. + * @param { RuntimeDownloadOptions } options - Download options. + * @param {Function} [progressListener] - called as the runtime is downloaded with progress information. + * @return {Promise.} + * @tutorial System.downloadRuntime + */ + downloadRuntime(options: RuntimeDownloadOptions, progressListener: (progress: RuntimeDownloadProgress) => void): Promise; + /** + * Download preload scripts from given URLs + * @param {DownloadPreloadOption[]} scripts - URLs of preload scripts. See tutorial for more details. + * @return {Promise.Array} + * @tutorial System.downloadPreloadScripts + */ + downloadPreloadScripts(scripts: Array): Promise>; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + * @return {Promise.Array.} + * @tutorial System.getAllExternalApplications + */ + getAllExternalApplications(): Promise>; + /** + * Retrieves app asset information. + * @param { AppAssetRequest } options + * @return {Promise.} + * @tutorial System.getAppAssetInfo + */ + getAppAssetInfo(options: AppAssetRequest): Promise; + /** + * Get additional info of cookies. + * @param { CookieOption } options - See tutorial for more details. + * @return {Promise.Array.} + * @tutorial System.getCookies + */ + getCookies(options: CookieOption): Promise>; + /** + * Set the minimum log level above which logs will be written to the OpenFin log + * @param { LogLevel } The minimum level (inclusive) above which all calls to log will be written + * @return {Promise.} + * @tutorial System.setMinLogLevel + */ + setMinLogLevel(level: LogLevel): Promise; + /** + * Retrieves the UUID of the computer on which the runtime is installed + * @param { string } uuid The uuid of the running application + * @return {Promise.} + * @tutorial System.resolveUuid + */ + resolveUuid(uuid: string): Promise; + /** + * Retrieves an array of data for all external applications + * @param { Identity } requestingIdentity This object is described in the Identity typedef + * @param { any } data Any data type to pass to the method + * @return {Promise.} + * @ignore + */ + executeOnRemote(requestingIdentity: Identity, data: any): Promise; + /** + * Reads the specifed value from the registry. + * @param { string } rootKey - The registry root key. + * @param { string } subkey - The registry key. + * @param { string } value - The registry value name. + * @return {Promise.} + * @tutorial System.readRegistryValue + */ + readRegistryValue(rootKey: string, subkey: string, value: string): Promise; + /** + * This function call will register a unique id and produce a token. + * The token can be used to broker an external connection. + * @param { string } uuid - A UUID for the remote connection. + * @return {Promise.} + * @tutorial System.registerExternalConnection + */ + registerExternalConnection(uuid: string): Promise; +} diff --git a/types/openfin/v34/_v2/api/system/window.d.ts b/types/openfin/v34/_v2/api/system/window.d.ts new file mode 100644 index 0000000000..886084fad6 --- /dev/null +++ b/types/openfin/v34/_v2/api/system/window.d.ts @@ -0,0 +1,14 @@ +export interface WindowInfo { + uuid: string; + mainWindow: WindowDetail; + childWindows: Array; +} +export interface WindowDetail { + name: string; + top: number; + right: number; + bottom: number; + height: number; + width: number; + left: number; +} diff --git a/types/openfin/v34/_v2/api/window/bounds-changed.d.ts b/types/openfin/v34/_v2/api/window/bounds-changed.d.ts new file mode 100644 index 0000000000..f7801da3fc --- /dev/null +++ b/types/openfin/v34/_v2/api/window/bounds-changed.d.ts @@ -0,0 +1,14 @@ +import { Reply } from '../base'; +export default class BoundsChangedReply extends Reply<'window', 'bounds-changed'> { + changeType: BoundsChangeType; + deferred: boolean; + height: number; + width: number; + top: number; + left: number; +} +export declare const enum BoundsChangeType { + POSITION = 0, + SIZE = 1, + POSITION_AND_SIZE = 2 +} diff --git a/types/openfin/v34/_v2/api/window/bounds.d.ts b/types/openfin/v34/_v2/api/window/bounds.d.ts new file mode 100644 index 0000000000..40822c4aa3 --- /dev/null +++ b/types/openfin/v34/_v2/api/window/bounds.d.ts @@ -0,0 +1,9 @@ +interface Bounds { + height: number; + width: number; + top: number; + left: number; + right?: number; + bottom?: number; +} +export default Bounds; diff --git a/types/openfin/v34/_v2/api/window/transition.d.ts b/types/openfin/v34/_v2/api/window/transition.d.ts new file mode 100644 index 0000000000..c16440c80d --- /dev/null +++ b/types/openfin/v34/_v2/api/window/transition.d.ts @@ -0,0 +1,24 @@ +export interface TransitionBase { + duration: number; + relative?: boolean; +} +export interface Opacity extends TransitionBase { + opacity: number; +} +export interface Position extends TransitionBase { + left: number; + top: number; +} +export interface Size extends TransitionBase { + width: number; + height: number; +} +export interface TransitionOptions { + interrupt: boolean; + tween?: string; +} +export interface Transition { + opacity?: Opacity; + position?: Position; + size?: Size; +} diff --git a/types/openfin/v34/_v2/api/window/window.d.ts b/types/openfin/v34/_v2/api/window/window.d.ts new file mode 100644 index 0000000000..8d597a6446 --- /dev/null +++ b/types/openfin/v34/_v2/api/window/window.d.ts @@ -0,0 +1,759 @@ +import { Base, EmitterBase, RuntimeEvent } from '../base'; +import { Identity } from '../../identity'; +import Bounds from './bounds'; +import BoundsChangedReply from './bounds-changed'; +import { Transition, TransitionOptions } from './transition'; +import { Application } from '../application/application'; +import Transport from '../../transport/transport'; +export default class _WindowModule extends Base { + private instance; + /** + * Returns a Window object that represents an existing window. + * @param { Identity } indentity + * @return {Promise.<_Window>} + * @tutorial Window.wrap + */ + wrap(identity: Identity): Promise<_Window>; + /** + * Creates a new Window. + * @param { * } options - Window creation options + * @return {Promise.<_Window>} + * @tutorial Window.create + */ + create(options: any): Promise<_Window>; + /** + * Returns a Window object that represents the current window + * @return {Promise.} + * @tutorial window.getCurrent + */ + getCurrent(): Promise<_Window>; +} +export interface CloseEventShape { + name: string; + uuid: string; + type: string; + topic: string; +} +export interface WindowInfo { + canNavigateBack: boolean; + canNavigateForward: boolean; + preloadScripts: Array; + title: string; + url: string; +} +export interface FrameInfo { + name: string; + uuid: string; + entityType: string; + parent?: Identity; +} +/** + * @typedef {object} Transition + * @property {Opacity} opacity - The Opacity transition + * @property {Position} position - The Position transition + * @property {Size} size - The Size transition +*/ +/** + * @typedef {object} TransitionOptions + * @property {boolean} interrupt - This option interrupts the current animation. When false it pushes +this animation onto the end of the animation queue. + * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false. + */ +/** + * @typedef {object} Size + * @property {number} duration - The total time in milliseconds this transition should take. + * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false. + * @property {number} width - Optional if height is present. Defaults to the window's current width. + * @property {number} height - Optional if width is present. Defaults to the window's current height. + */ +/** + * @typedef {object} Position + * @property {number} duration - The total time in milliseconds this transition should take. + * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false. + * @property {number} left - Defaults to the window's current left position in virtual screen coordinates. + * @property {number} top - Defaults to the window's current top position in virtual screen coordinates. + */ +/** + * @typedef {object} Opacity + * @property {number} duration - The total time in milliseconds this transition should take. + * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false. + * @property {number} opacity - This value is clamped from 0.0 to 1.0. +*/ +/** + * Bounds is a interface that has the properties of height, + * width, left, top which are all numbers + * @typedef { Object } Bounds + * @property { number } height Get the application height bound + * @property { number } width Get the application width bound + * @property { number } top Get the application top bound + * @property { number } left Get the application left bound + * @property { number } right Get the application right bound + * @property { number } bottom Get the application bottom bound + */ +/** + * @classdesc A basic window that wraps a native HTML window. Provides more fine-grained + * control over the window state such as the ability to minimize, maximize, restore, etc. + * By default a window does not show upon instantiation; instead the window's show() method + * must be invoked manually. The new window appears in the same process as the parent window. + * @class + * @alias Window +*/ +export declare class _Window extends EmitterBase { + identity: Identity; + /** + * Raised when a window within this application requires credentials from the user. + * + * @event Window#auth-requested + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {object} authInfo + * @property {string} authInfo.host - Host server. + * @property {boolean} authInfo.isProxy - Indicates if the request involves a proxy. + * @property {number} authInfo.port - Port number. + * @property {string} authInfo.realm - Authentication request realm. + * @property {string} authInfo.scheme - Authentication scheme. + */ + /** + * Raised when a window loses focus. + * + * @event Window#blurred + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised after changes in a window's size and/or position. + * + * @event Window#bounds-changed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {number} changeType - Describes what kind of change occurred. + 0 means a change in position. + 1 means a change in size. + 2 means a change in position and size. + * @property {string} deferred - Indicated whether pending changes have been applied. + * @property {number} height - New height of the window. + * @property {number} left - New left most coordinate of the window. + * @property {number} top - New top most coordinate of the window. + * @property {number} width - New width of the window. + */ + /** + * Raised when a window has been prevented from closing. A window will be prevented from closing by default, + either through the API or by a user when ‘close-requested’ has been subscribed to and the Window.close(force) flag is false. + * + * @event Window#close-requested + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window has closed. + * + * @event Window#closed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window has crashed. + * + * @event Window#crashed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when the frame is disabled after all prevent user changes in window's size and/or position have completed. + * + * @event Window#disabled-frame-bounds-changed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {number} changeType - Describes what kind of change occurred. + 0 means a change in position. + 1 means a change in size. + 2 means a change in position and size. + * @property {string} deferred - Indicated whether pending changes have been applied. + * @property {number} height - New height of the window. + * @property {number} left - New left most coordinate of the window. + * @property {number} top - New top most coordinate of the window. + * @property {number} width - New width of the window. + */ + /** + * Raised when the frame is disabled during prevented user changes to a window's size and/or position. + * + * @event Window#disabled-frame-bounds-changing + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {number} changeType - Describes what kind of change occurred. + 0 means a change in position. + 1 means a change in size. + 2 means a change in position and size. + * @property {string} deferred - Indicated whether pending changes have been applied. + * @property {number} height - New height of the window. + * @property {number} left - New left most coordinate of the window. + * @property {number} top - New top most coordinate of the window. + * @property {number} width - New width of the window. + */ + /** + * Raised when the window has been embedded. + * + * @event Window#embedded + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when an external process has exited. + * + * @event Window#external-process-exited + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {string} processUuid - The process handle UUID. + * @property {number} exitCode - The process exit code + */ + /** + * Raised when an external process has started. + * + * @event Window#external-process-started + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {string} processUuid - The process handle UUID. + */ + /** + * Raised when a window's frame becomes disabled. + * + * @event Window#frame-disabled + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window's frame becomes enabled. + * + * @event Window#frame-enabled + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window joins/leaves a group and/or when the group a window is a member of changes. + * + * @event Window#group-changed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {string} source - Which group array the window that the event listener was registered on is included in: + 'source' The window is included in sourceGroup. + 'target' The window is included in targetGroup. + 'nothing' The window is not included in sourceGroup nor targetGroup. + * @property {string} reason - The reason this event was triggered. + 'leave' A window has left the group due to a leave or merge with group. + 'join' A window has joined the group. + 'merge' Two groups have been merged together. + 'disband' There are no other windows in the group. + * @property {string} name - Name of the window. + * @property {legacyWindowIdentity[]} sourceGroup - All the windows in the group the sourceWindow originated from. + * @property {string} sourceWindowAppUuid - UUID of the application the sourceWindow belongs to the + source window is the window in which (merge/join/leave)group(s) was called. + * @property {string} sourceWindowName - Name of the sourcewindow. + The source window is the window in which (merge/join/leave)group(s) was called. + * @property {legacyWindowIdentity[]} targetGroup - All the windows in the group the targetWindow orginated from. + * @property {string} targetWindowAppUuid - UUID of the application the targetWindow belongs to. + The target window is the window that was passed into (merge/join)group(s). + * @property {string} targetWindowName - Name of the targetWindow. + The target window is the window that was passed into (merge/join)group(s). + */ + /** + * Raised when a window has been hidden. + * + * @event Window#hidden + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {string} reason - Action prompted the close The reasons are: + "hide" + "hide-on-close" + */ + /** + * Raised when a window is initialized. + * + * @event Window#initialized + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window is maximized. + * + * @event Window#maximized + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window is minimized. + * + * @event Window#minimized + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when window navigation is rejected as per ContentNavigation whitelist/blacklist rules. + * + * @event Window#navigation-rejected + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {string} sourceName - source of navigation window name. + * @property {string} url - Blocked content url. + */ + /** + * Raised when a window is out of memory. + * + * @event Window#out-of-memory + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised after the execution of all of a window's preload scripts. Contains + information about all window's preload scripts' final states. + * + * @event Window#preload-scripts-state-changed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {preloadScriptState[]} preloadState - An array of all final preload scripts' states + */ + /** + * Raised during the execution of a window's preload script. Contains information + about a single window's preload script's state, for which the event has been raised. + * + * @event Window#preload-scripts-state-changing + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {preloadScriptState[]} preloadState - An array of all final preload scripts' states + */ + /** + * Raised when an HTTP load was cancelled or failed. + * + * @event Window#resource-load-failed + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {number} errorCode - The Chromium error code. + * @property {string} errorDescription - The Chromium error description. + * @property {string} validatedURL - The url attempted. + * @property {boolean} isMainFrame - Was the attempt made from the main frame. + */ + /** + * Raised when an HTTP resource request has received response details. + * + * @event Window#resource-response-received + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {boolean} status - Status of the request. + * @property {string} newUrl - The URL of the responded resource. + * @property {string} originalUrl - The requested URL. + * @property {number} httpResponseCode - The HTTP Response code. + * @property {string} requestMethod - The HTTP request method. + * @property {string} referrer - The HTTP referrer. + * @property {object} headers - The HTTP headers. + * @property {string} resourceType - Resource type: + "mainFrame", "subFrame", + "styleSheet", "script", "image", + "object", "xhr", or "other" + */ + /** + * Raised when a window has reloaded. + * + * @event Window#reloaded + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + * @property {string} url - Url has has been reloaded. + */ + /** + * Raised when a window is displayed after having been minimized or + when a window leaves the maximize state without minimizing. + * + * @event Window#restored + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window has been prevented from showing. + A window will be prevented from showing by default, either through the API or by a user when + ‘show-requested’ has been subscribed to on the window or 'window-show-requested' + on the parent application and the Window.show(force) flag is false. + * + * @event Window#show-requested + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * Raised when a window been shown. + * + * @event Window#shown + * @type {object} + * @property {string} name - Name of the window. + * @property {string} uuid - UUID of the application that the window belongs to. + */ + /** + * @typedef {object} legacyWindowIdentity + * @summary Object summary + * @desc Object description + * @property {string} appUuid - The UUID of the application this window entry belongs to. + * @property {string} windowName - The name of this window entry. + */ + /** + * @typedef {object} preloadScriptState + * @summary Object summary + * @desc Object description + * @property {string} url - The url of the preload script. + * @property {string} state - The preload script state: + "load-failed", "failed", "succeeded" + */ + private nativeWindow; + constructor(wire: Transport, identity: Identity); + createWindow(options: any): Promise<_Window>; + protected runtimeEventComparator: (listener: RuntimeEvent) => boolean; + private windowListFromNameList; + /** + * Retrieves an array of frame info objects representing the main frame and any + * iframes that are currently on the page. + * @return {Promise.>} + * @tutorial Window.getAllFrames + */ + getAllFrames(): Promise>; + /** + * Gets the current bounds (top, left, width, height) of the window. + * @return {Promise.} + * @tutorial Window.getBounds + */ + getBounds(): Promise; + /** + * Returns the native JavaScript "window" object for the window. + * @return {Promise.} + * @tutorial Window.getNativeWindow + */ + getNativeWindow(): Promise; + /** + * Gives focus to the window. + * @return {Promise.} + * @emits _Window#focused + * @tutorial Window.focus + */ + focus(): Promise; + /** + * Removes focus from the window. + * @return {Promise.} + * @tutorial Window.blur + */ + blur(): Promise; + /** + * Brings the window to the front of the window stack. + * @return {Promise.} + * @tutorial Window.bringToFront + */ + bringToFront(): Promise; + /** + * Performs the specified window transitions. + * @param {Transition} transitions - Describes the animations to perform. See the tutorial. + * @param {TransitionOptions} options - Options for the animation. See the tutorial. + * @return {Promise.} + * @tutorial Window.animate + */ + animate(transitions: Transition, options: TransitionOptions): Promise; + /** + * Hides the window. + * @return {Promise.} + * @tutorial Window.hide + */ + hide(): Promise; + /** + * closes the window application + * @param { boolean } [force = false] Close will be prevented from closing when force is false and + * ‘close-requested’ has been subscribed to for application’s main window. + * @return {Promise.} + * @tutorial Window.close + */ + close(force?: boolean): Promise; + /** + * Returns then running applications uuid + * @return {Promise.} + * @tutorial Window.getNativeId + */ + getNativeId(): Promise; + /** + * Prevents a user from changing a window's size/position when using the window's frame. + * @return {Promise.} + * @tutorial Window.disableFrame + */ + disableFrame(): Promise; + /** + * Re-enables user changes to a window's size/position when using the window's frame. + * @return {Promise.} + * @tutorial Window.enableFrame + */ + enableFrame(): Promise; + /** + * Executes Javascript on the window, restricted to windows you own or windows owned by + * applications you have created. + * @param { string } code JavaScript code to be executed on the window. + * @return {Promise.} + * @tutorial Window.executeJavaScript + */ + executeJavaScript(code: string): Promise; + /** + * Flashes the window’s frame and taskbar icon until stopFlashing is called. + * @return {Promise.} + * @tutorial Window.flash + */ + flash(): Promise; + /** + * Stops the taskbar icon from flashing. + * @return {Promise.} + * @tutorial Window.stopFlashing + */ + stopFlashing(): Promise; + /** + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this + * window. If a window is not in a group an empty array is returned. Please note that + * calling window is included in the result array. + * @return {Promise.>} + * @tutorial Window.getGroup + */ + getGroup(): Promise>; + /** + * Gets an information object for the window. + * @return {Promise.} + * @tutorial Window.getInfo + */ + getInfo(): Promise; + /** + * Gets the current settings of the window. + * @return {Promise.} + * @tutorial Window.getOptions + */ + getOptions(): Promise; + /** + * Gets the parent application. + * @return {Promise.} + * @tutorial Window.getParentApplication + */ + getParentApplication(): Promise; + /** + * Gets the parent window. + * @return {Promise.<_Window>} + * @tutorial Window.getParentWindow + */ + getParentWindow(): Promise<_Window>; + /** + * Gets a base64 encoded PNG snapshot of the window. + * @return {Promise.} + * @tutorial Window.getSnapshot + */ + getSnapshot(): Promise; + /** + * Gets the current state ("minimized", "maximized", or "restored") of the window. + * @return {Promise.} + * @tutorial Window.getState + */ + getState(): Promise; + /** + * Determines if the window is currently showing. + * @return {Promise.} + * @tutorial Window.isShowing + */ + isShowing(): Promise; + /** + * Joins the same window group as the specified window. + * @param { class } target The window whose group is to be joined + * @return {Promise.} + * @tutorial Window.joinGroup + */ + joinGroup(target: _Window): Promise; + /** + * Reloads the window current page + * @return {Promise.} + * @tutorial Window.reload + */ + reload(ignoreCache?: boolean): Promise; + /** + * Leaves the current window group so that the window can be move independently of those in the group. + * @return {Promise.} + * @tutorial Window.leaveGroup + */ + leaveGroup(): Promise; + /** + * Maximizes the window + * @return {Promise.} + * @tutorial Window.maximize + */ + maximize(): Promise; + /** + * Merges the instance's window group with the same window group as the specified window + * @param { class } target The window whose group is to be merged with + * @return {Promise.} + * @tutorial Window.mergeGroups + */ + mergeGroups(target: _Window): Promise; + /** + * Minimizes the window. + * @return {Promise.} + * @tutorial Window.minimize + */ + minimize(): Promise; + /** + * Moves the window by a specified amount. + * @param { number } deltaLeft The change in the left position of the window + * @param { number } deltaTop The change in the top position of the window + * @return {Promise.} + * @tutorial Window.moveBy + */ + moveBy(deltaLeft: number, deltaTop: number): Promise; + /** + * Moves the window to a specified location. + * @param { number } left The left position of the window + * @param { number } top The top position of the window + * @return {Promise.} + * @tutorial Window.moveTo + */ + moveTo(left: number, top: number): Promise; + /** + * Resizes the window by a specified amount. + * @param { number } deltaWidth The change in the width of the window + * @param { number } deltaHeight The change in the height of the window + * @param { string } anchor Specifies a corner to remain fixed during the resize. + * Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right." + * If undefined, the default is "top-left" + * @return {Promise.} + * @tutorial Window.resizeBy + */ + resizeBy(deltaWidth: number, deltaHeight: number, anchor: string): Promise; + /** + * Resizes the window to the specified dimensions. + * @param { number } width The change in the width of the window + * @param { number } height The change in the height of the window + * @param { string } anchor Specifies a corner to remain fixed during the resize. + * Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right." + * If undefined, the default is "top-left" + * @return {Promise.} + * @tutorial Window.resizeTo + */ + resizeTo(width: number, height: number, anchor: string): Promise; + /** + * Restores the window to its normal state (i.e., unminimized, unmaximized). + * @return {Promise.} + * @tutorial Window.restore + */ + restore(): Promise; + /** + * Will bring the window to the front of the entire stack and give it focus. + * @return {Promise.} + * @tutorial Window.setAsForeground + */ + setAsForeground(): Promise; + /** + * Sets the window's size and position. + * @property { Bounds } bounds This is a * @type {string} name - name of the window.object that holds the propertys of + * @return {Promise.} + * @tutorial Window.setBounds + */ + setBounds(bounds: Bounds): Promise; + /** + * Shows the window if it is hidden. + * @param { boolean } [force = false] Show will be prevented from showing when force is false and + * ‘show-requested’ has been subscribed to for application’s main window. + * @return {Promise.} + * @tutorial Window.show + */ + show(force?: boolean): Promise; + /** + * Shows the window if it is hidden at the specified location. + * If the toggle parameter is set to true, the window will + * alternate between showing and hiding. + * @param { number } left The left position of the window + * @param { number } top The right position of the window + * @param { boolean } force Show will be prevented from closing when force is false and + * ‘show-requested’ has been subscribed to for application’s main window + * @return {Promise.} + * @tutorial Window.showAt + */ + showAt(left: number, top: number, force?: boolean): Promise; + /** + * Shows the Chromium Developer Tools + * @return {Promise.} + * @tutorial Window.showDeveloperTools + */ + showDeveloperTools(): Promise; + /** + * Updates the window using the passed options + * @param {*} options Changes a window's options that were defined upon creation. See tutorial + * @return {Promise.} + * @tutorial Window.updateOptions + */ + updateOptions(options: any): Promise; + /** + * Provides credentials to authentication requests + * @param { string } userName userName to provide to the authentication challange + * @param { string } password password to provide to the authentication challange + * @return {Promise.} + * @tutorial Window.authenticate + */ + authenticate(userName: string, password: string): Promise; + /** + * Returns the zoom level of the window. + * @return {Promise.} + * @tutorial Window.getZoomLevel + */ + getZoomLevel(): Promise; + /** + * Sets the zoom level of the window. + * @param { number } level The zoom level + * @return {Promise.} + * @tutorial Window.setZoomLevel + */ + setZoomLevel(level: number): Promise; + /** + * Navigates the window to a specified URL. + * @param {string} url - The URL to navigate the window to. + * @return {Promise.} + * @tutorial Window.navigate + */ + navigate(url: string): Promise; + /** + * Navigates the window back one page. + * @return {Promise.} + * @tutorial Window.navigateBack + */ + navigateBack(): Promise; + /** + * Stops any current navigation the window is performing. + * @return {Promise.} + * @tutorial Window.stopNavigation + */ + stopNavigation(): Promise; +} +export interface _Window { + on(type: 'focused', listener: Function): Promise; + on(type: 'initialized', listener: Function): Promise; + on(type: 'bounds-changed', listener: (data: BoundsChangedReply) => void): Promise; + on(type: 'hidden', listener: Function): Promise; + on(type: 'removeListener', listener: (eventType: string | symbol) => void): Promise; + on(type: 'newListener', listener: (eventType: string | symbol) => void): Promise; + on(type: 'closed', listener: (eventType: CloseEventShape) => void): Promise; + on(type: 'fire-constructor-callback', listener: Function): Promise; +} diff --git a/types/openfin/v34/_v2/environment/environment.d.ts b/types/openfin/v34/_v2/environment/environment.d.ts new file mode 100644 index 0000000000..0b0f1571f2 --- /dev/null +++ b/types/openfin/v34/_v2/environment/environment.d.ts @@ -0,0 +1,10 @@ +import { NewConnectConfig } from '../transport/wire'; +export interface Environment { + writeToken(path: string, token: string): Promise; + retrievePort(config: NewConnectConfig): Promise; + getNextMessageId(): any; + getRandomId(): string; + createChildWindow(options: any): Promise; + isWindowExists(uuid: string, name: string): boolean; +} +export declare const notImplementedEnvErrorMsg = "Not implemented in this environment"; diff --git a/types/openfin/v34/_v2/environment/node-env.d.ts b/types/openfin/v34/_v2/environment/node-env.d.ts new file mode 100644 index 0000000000..03e0faeede --- /dev/null +++ b/types/openfin/v34/_v2/environment/node-env.d.ts @@ -0,0 +1,11 @@ +import { Environment } from './environment'; +import { NewConnectConfig } from '../transport/wire'; +export default class NodeEnvironment implements Environment { + private messageCounter; + writeToken: (path: string, token: string) => Promise; + retrievePort: (config: NewConnectConfig) => Promise; + getNextMessageId: () => any; + createChildWindow: (options: any) => Promise; + getRandomId: () => string; + isWindowExists: (uuid: string, name: string) => boolean; +} diff --git a/types/openfin/v34/_v2/environment/openfin-env.d.ts b/types/openfin/v34/_v2/environment/openfin-env.d.ts new file mode 100644 index 0000000000..456e2f8caf --- /dev/null +++ b/types/openfin/v34/_v2/environment/openfin-env.d.ts @@ -0,0 +1,11 @@ +import { Environment } from './environment'; +import { NewConnectConfig } from '../transport/wire'; +export default class OpenFinEnvironment implements Environment { + writeToken: (path: string, token: string) => Promise; + retrievePort: (config: NewConnectConfig) => Promise; + getNextMessageId: () => any; + createChildWindow: (options: any) => Promise; + getRandomId: () => string; + private resolveUrl; + isWindowExists: (uuid: string, name: string) => boolean; +} diff --git a/types/openfin/v34/_v2/environment/openfin-renderer-api.d.ts b/types/openfin/v34/_v2/environment/openfin-renderer-api.d.ts new file mode 100644 index 0000000000..82822c3111 --- /dev/null +++ b/types/openfin/v34/_v2/environment/openfin-renderer-api.d.ts @@ -0,0 +1,6 @@ +export declare const ipc: any; +export declare const routingId: any; +export declare const CORE_MESSAGE_CHANNEL: any; +export declare const outboundTopic = "of-window-message"; +export declare const inboundTopic: string; +export declare const currentWindowIdentity: any; diff --git a/types/openfin/v34/_v2/identity.d.ts b/types/openfin/v34/_v2/identity.d.ts new file mode 100644 index 0000000000..f10f030248 --- /dev/null +++ b/types/openfin/v34/_v2/identity.d.ts @@ -0,0 +1,4 @@ +export interface Identity { + uuid: string; + name?: string; +} diff --git a/types/openfin/v34/_v2/launcher/launcher.d.ts b/types/openfin/v34/_v2/launcher/launcher.d.ts new file mode 100644 index 0000000000..d0ffc16989 --- /dev/null +++ b/types/openfin/v34/_v2/launcher/launcher.d.ts @@ -0,0 +1,15 @@ +/// +import { ChildProcess } from 'child_process'; +import { ConfigWithRuntime } from '../transport/wire'; +export default class Launcher { + private os; + OpenFin_Installer: string; + Installer_Work_Dir: string; + Security_Realm_Config_Key: string; + nixConfig?: any; + constructor(); + launch(config: ConfigWithRuntime, manifestLocation: string, namedPipeName: string): Promise; + static IS_SUPPORTED(): boolean; + private macLaunch; + private winLaunch; +} diff --git a/types/openfin/v34/_v2/launcher/nix-launch.d.ts b/types/openfin/v34/_v2/launcher/nix-launch.d.ts new file mode 100644 index 0000000000..02b0da4fbb --- /dev/null +++ b/types/openfin/v34/_v2/launcher/nix-launch.d.ts @@ -0,0 +1,14 @@ +/// +import { ChildProcess } from 'child_process'; +import { ConfigWithRuntime } from '../transport/wire'; +export declare function getUrl(version: string, urlPath: string): string; +export declare function download(version: string, folder: string, osConfig: OsConfig): Promise; +export declare function getRuntimePath(version: string): Promise; +export declare function install(versionOrChannel: string, osConfig: OsConfig): Promise; +export interface OsConfig { + manifestLocation: string; + namedPipeName: string; + urlPath: string; + executablePath: string; +} +export default function launch(config: ConfigWithRuntime, osConfig: OsConfig): Promise; diff --git a/types/openfin/v34/_v2/launcher/util.d.ts b/types/openfin/v34/_v2/launcher/util.d.ts new file mode 100644 index 0000000000..808ad015ea --- /dev/null +++ b/types/openfin/v34/_v2/launcher/util.d.ts @@ -0,0 +1,8 @@ +export declare function exists(path: string): Promise; +export declare function get(url: string): Promise; +export declare function unzip(file: string, dest: string): Promise; +export declare function rmDir(dirPath: string, removeSelf?: boolean): Promise; +export declare function downloadFile(url: string, writeLocation: string): Promise<{}>; +export declare function resolveRuntimeVersion(versionOrChannel: string): Promise; +export declare function first(arr: T[], func: (x: T, i: number, r: T[]) => boolean): T | null; +export declare function resolveDir(base: string, paths: string[]): Promise; diff --git a/types/openfin/v34/_v2/launcher/win-launch.d.ts b/types/openfin/v34/_v2/launcher/win-launch.d.ts new file mode 100644 index 0000000000..b08fac3f8a --- /dev/null +++ b/types/openfin/v34/_v2/launcher/win-launch.d.ts @@ -0,0 +1,4 @@ +/// +import { ChildProcess } from 'child_process'; +import { ConfigWithRuntime } from '../transport/wire'; +export default function launch(config: ConfigWithRuntime, manifestLocation: string, namedPipeName: string, Installer_Work_Dir: string): Promise; diff --git a/types/openfin/v34/_v2/main.d.ts b/types/openfin/v34/_v2/main.d.ts new file mode 100644 index 0000000000..2f4a3d8730 --- /dev/null +++ b/types/openfin/v34/_v2/main.d.ts @@ -0,0 +1,11 @@ +import Fin from './api/fin'; +import { Application } from './api/application/application'; +import { _Window as Window } from './api/window/window'; +import { _Frame as Frame } from './api/frame/frame'; +import { _Notification as Notification } from './api/notification/notification'; +import System from './api/system/system'; +import { ConnectConfig } from './transport/wire'; +export declare function connect(config: ConnectConfig): Promise; +export declare function launch(config: ConnectConfig): Promise; +export { Identity } from './identity'; +export { Fin, Application, Window, System, Frame, Notification }; diff --git a/types/openfin/v34/_v2/of-main.d.ts b/types/openfin/v34/_v2/of-main.d.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/types/openfin/v34/_v2/of-main.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/types/openfin/v34/_v2/transport/elipc.d.ts b/types/openfin/v34/_v2/transport/elipc.d.ts new file mode 100644 index 0000000000..94c398cba5 --- /dev/null +++ b/types/openfin/v34/_v2/transport/elipc.d.ts @@ -0,0 +1,13 @@ +/// +import { EventEmitter } from 'events'; +import { Wire, READY_STATE } from './wire'; +export default class ElIPCTransport extends EventEmitter implements Wire { + protected wire: any; + onmessage: (data: any) => void; + constructor(onmessage: (data: any) => void); + connectSync: () => any; + connect: (address: string) => Promise; + send(data: any, flags?: any): Promise; + shutdown(): Promise; + static READY_STATE: typeof READY_STATE; +} diff --git a/types/openfin/v34/_v2/transport/port-discovery.d.ts b/types/openfin/v34/_v2/transport/port-discovery.d.ts new file mode 100644 index 0000000000..d8ea25934d --- /dev/null +++ b/types/openfin/v34/_v2/transport/port-discovery.d.ts @@ -0,0 +1,17 @@ +import { PortDiscoveryConfig } from './wire'; +import { Environment } from '../environment/environment'; +export declare class PortDiscovery { + private savedConfig; + private namedPipeName; + private manifestLocation; + private namedPipeServer; + private pipeConnection; + private timeoutTimer; + private environment; + constructor(config: PortDiscoveryConfig, environment: Environment); + retrievePort(): Promise; + private createDiscoveryNamedPipe; + private listenDiscoveryMessage; + private createManifest; + private cleanup; +} diff --git a/types/openfin/v34/_v2/transport/transport-errors.d.ts b/types/openfin/v34/_v2/transport/transport-errors.d.ts new file mode 100644 index 0000000000..90f9d10f55 --- /dev/null +++ b/types/openfin/v34/_v2/transport/transport-errors.d.ts @@ -0,0 +1,17 @@ +export declare class DisconnectedError extends Error { + constructor(readyState: number); + readyState: number; +} +export declare class UnexpectedActionError extends Error { +} +export declare class DuplicateCorrelationError extends Error { +} +export declare class NoAckError extends Error { +} +export declare class NotImplementedError extends Error { +} +export declare class NotSupportedError extends Error { +} +export declare class RuntimeError extends Error { + constructor(data: any); +} diff --git a/types/openfin/v34/_v2/transport/transport.d.ts b/types/openfin/v34/_v2/transport/transport.d.ts new file mode 100644 index 0000000000..fb7b967240 --- /dev/null +++ b/types/openfin/v34/_v2/transport/transport.d.ts @@ -0,0 +1,48 @@ +/// +import { Wire, WireConstructor, READY_STATE, ExistingConnectConfig, ConnectConfig, InternalConnectConfig } from './wire'; +import { Identity } from '../identity'; +import { EventEmitter } from 'events'; +import { Environment } from '../environment/environment'; +export declare type MessageHandler = (data: any) => boolean; +declare class Transport extends EventEmitter { + protected wireListeners: Map; + protected uncorrelatedListener: Function; + protected messageHandlers: MessageHandler[]; + me: Identity; + protected wire: Wire; + environment: Environment; + topicRefMap: Map; + sendRaw: Wire['send']; + constructor(wireType: WireConstructor, environment: Environment); + connectSync: (config: ConnectConfig) => any; + connect(config: InternalConnectConfig): Promise; + connectByPort(config: ExistingConnectConfig): Promise; + READY_STATE: typeof READY_STATE; + ferryAction(data: any): Promise>; + registerMessageHandler(handler: MessageHandler): void; + protected addWireListener(id: number, resolve: Function, reject: Function, uncorrelated: boolean): void; + protected onmessage(data: Message): void; + protected handleMessage(data: Message): boolean; +} +export default Transport; +interface Transport { + sendAction(action: 'request-external-authorization', payload: {}, uncorrelated: true): Promise>; + sendAction(action: string, payload: {}, uncorrelated: boolean): Promise>; + topicRefMap: Map; +} +export declare class Message { + action: string; + payload: T; + correlationId?: number; +} +export declare class Payload { + success: boolean; + data: any; +} +export declare class AuthorizationPayload { + token: string; + file: string; +} diff --git a/types/openfin/v34/_v2/transport/websocket.d.ts b/types/openfin/v34/_v2/transport/websocket.d.ts new file mode 100644 index 0000000000..5617afa8e3 --- /dev/null +++ b/types/openfin/v34/_v2/transport/websocket.d.ts @@ -0,0 +1,14 @@ +/// +import { EventEmitter } from 'events'; +import * as WebSocket from 'ws'; +import { Wire, READY_STATE } from './wire'; +export default class WebSocketTransport extends EventEmitter implements Wire { + protected wire: WebSocket; + onmessage: (data: any) => void; + constructor(onmessage: (data: any) => void); + connect: (address: string) => Promise; + connectSync: () => any; + send(data: any, flags?: any): Promise; + shutdown(): Promise; + static READY_STATE: typeof READY_STATE; +} diff --git a/types/openfin/v34/_v2/transport/wire.d.ts b/types/openfin/v34/_v2/transport/wire.d.ts new file mode 100644 index 0000000000..227c6d4d72 --- /dev/null +++ b/types/openfin/v34/_v2/transport/wire.d.ts @@ -0,0 +1,71 @@ +/// +import { EventEmitter } from 'events'; +export interface Wire extends EventEmitter { + connect(address: string): Promise; + connectSync(): any; + send(data: any): Promise; + shutdown(): Promise; +} +export interface WireConstructor { + new (onmessage: (data: any) => void): Wire; +} +export interface RuntimeConfig { + version: string; + fallbackVersion?: string; + securityRealm?: string; + verboseLogging?: boolean; + arguments?: string; + rvmDir?: string; +} +export interface BaseConfig { + uuid?: string; + address?: string; + name?: string; + nonPersistent?: boolean; + runtimeClient?: boolean; + licenseKey?: string; + client?: any; + manifestUrl?: string; + startupApp?: any; + lrsUrl?: string; + assetsUrl?: string; + devToolsPort?: number; + installerUI?: boolean; + runtime?: RuntimeConfig; + appAssets?: [{ + src: string; + alias: string; + target: string; + version: string; + args: string; + }]; + customItems?: [any]; + timeout?: number; +} +export interface ConfigWithUuid extends BaseConfig { + uuid: string; +} +export interface ExistingConnectConfig extends ConfigWithUuid { + address: string; +} +export interface ConfigWithRuntime extends BaseConfig { + runtime: RuntimeConfig; +} +export interface ExternalConfig extends BaseConfig { + manifestUrl: string; +} +export declare type NewConnectConfig = ConfigWithUuid & ConfigWithRuntime; +export declare type PortDiscoveryConfig = (ExternalConfig & ConfigWithRuntime) | NewConnectConfig; +export declare type ConnectConfig = ExistingConnectConfig | NewConnectConfig | ExternalConfig; +export declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig; +export declare function isExternalConfig(config: ConnectConfig): config is ExternalConfig; +export declare function isExistingConnectConfig(config: any): config is ExistingConnectConfig; +export declare function isNewConnectConfig(config: any): config is NewConnectConfig; +export declare function isPortDiscoveryConfig(config: any): config is PortDiscoveryConfig; +export declare function isInternalConnectConfig(config: any): config is InternalConnectConfig; +export declare enum READY_STATE { + CONNECTING = 0, + OPEN = 1, + CLOSING = 2, + CLOSED = 3 +} diff --git a/types/openfin/v34/_v2/util/normalize-config.d.ts b/types/openfin/v34/_v2/util/normalize-config.d.ts new file mode 100644 index 0000000000..ed322d30ec --- /dev/null +++ b/types/openfin/v34/_v2/util/normalize-config.d.ts @@ -0,0 +1,3 @@ +import { ConnectConfig, InternalConnectConfig, ExternalConfig } from '../transport/wire'; +export declare function normalizeConfig(config: ConnectConfig): Promise; +export declare function validateConfig(config: ConnectConfig): Promise; diff --git a/types/openfin/v34/_v2/util/promises.d.ts b/types/openfin/v34/_v2/util/promises.d.ts new file mode 100644 index 0000000000..8e7bf9efe9 --- /dev/null +++ b/types/openfin/v34/_v2/util/promises.d.ts @@ -0,0 +1,5 @@ +export declare function promisify(func: Function): (...args: any[]) => Promise; +export declare function promiseMap(arr: T[], asyncF: (x: T, i: number, r: T[]) => Promise): Promise; +export declare type asyncF = (...args: any[]) => Promise; +export declare function serial(arr: asyncF[]): Promise; +export declare function promiseMapSerial(arr: any[], func: asyncF): Promise; diff --git a/types/openfin/v34/_v2/util/ref-counter.d.ts b/types/openfin/v34/_v2/util/ref-counter.d.ts new file mode 100644 index 0000000000..8184e09079 --- /dev/null +++ b/types/openfin/v34/_v2/util/ref-counter.d.ts @@ -0,0 +1,7 @@ +export default class RefCoutner { + topicRefMap: Map; + incRefCount(key: string): number; + decRefCount(key: string): number; + actOnFirst(key: string, firstAction: () => any, nonFirstAction?: () => void): any; + actOnLast(key: string, lastAction: () => any, nonLastAction?: () => void): any; +} diff --git a/types/openfin/v34/index.d.ts b/types/openfin/v34/index.d.ts new file mode 100644 index 0000000000..fe34f0b630 --- /dev/null +++ b/types/openfin/v34/index.d.ts @@ -0,0 +1,1907 @@ +// Type definitions for OpenFin API 34.0 +// Project: https://openfin.co/ +// Definitions by: Chris Barker +// Ricardo de Pena +// Roma +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +// based on v9.61.34.22 +// see https://openfin.co/support/technical-faq/#what-do-the-numbers-in-the-runtime-version-mean + +/** + * JavaScript API + * The JavaScript API allows you to create an HTML/JavaScript application that has access to the native windowing environment, + * can communicate with other applications and has access to sandboxed system-level features. + * + * API Ready + * When using the OpenFin API, it is important to ensure that it has been fully loaded before making any API calls. To verify + * that the API is in fact ready, be sure to make any API calls either from within the fin.desktop.main() method or explicitly + * after it has returned. This avoids the situation of trying to access methods that are not yet fully injected. + * + * Overview + * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API + * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "documennt" objects. + */ +declare namespace fin { + var Application: import('./_v2/api/application/application').default + var Clipboard: import('./_v2/api/clipboard/clipboard').default + var ExternalApplication: import('./_v2/api/external-application/external-application').default + var Frame: import('./_v2/api/frame/frame').default + var GlobalHotkey: import('./_v2/api/global-hotkey/index').default + var InterApplicationBus: import('./_v2/api/interappbus/interappbus').default + var Notification: import('./_v2/api/notification/notification').default + var System: import('./_v2/api/system/system').default + var Window: import('./_v2/api/window/window').default + + const desktop: OpenFinDesktop; + + interface OpenFinDesktop { + main(f: () => any): void; + Application: OpenFinApplicationStatic; + ExternalApp: OpenFinExternalApplicationStatic; + InterApplicationBus: OpenFinInterApplicationBus; + Notification: OpenFinNotificationStatic; + System: OpenFinSystem; + Window: OpenFinWindowStatic; + Frame: OpenFinFrameStatic; + } + + interface OpenFinApplicationStatic { + /** + * Creates a new Application. + * An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events. + */ + new ( + options: ApplicationOptions, + callback?: (successObj: { httpResponseCode: number }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinApplication; + /** + * Launches the given Application manifest. + */ + createFromManifest(manifestUrl: string, callback?: (app: OpenFinApplication) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Returns an Application object that represents an existing application. + */ + getCurrent(): OpenFinApplication; + /** + * Returns an Application object that represents an existing application. + */ + wrap(uuid: string): OpenFinApplication; + } + + /** + * Application + * An object representing an application.Allows the developer to create, execute, show / close an application as well as listen to application events. + */ + interface OpenFinApplication { + /** + * Returns an instance of the main Window of the application + */ + getWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinApplicationEventType, + listener: (event: ApplicationBaseEvent + | TrayIconClickedEvent + | WindowEvent + | WindowAlertRequestedEvent + | WindowAuthRequested + | WindowNavigationRejectedEvent + | WindowEndLoadEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Closes the application and any child windows created by the application. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of wrapped fin.desktop.Windows for each of the application's child windows. + */ + getChildWindows(callback?: (children: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.desktop.Windows. + */ + getGroups(callback?: (groups: OpenFinWindow[][]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest. + */ + getManifest(callback?: (manifest: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest. + */ + getParentUuid(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves current configuration of application's shortcuts. + */ + getShortcuts(callback?: (config: ShortCutConfig) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves information about the application. + */ + getInfo(callback?: (info: LaunchInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves information about the system tray. + */ + getTrayIconInfo(callback?: (trayInfo: TrayIconInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the application is currently running. + */ + isRunning(callback?: (running: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Registers a username and an app name for licensing purposes. + */ + registerUser(userName: string, appName: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinApplicationEventType, + previouslyRegisteredListener: (event: ApplicationBaseEvent + | TrayIconClickedEvent + | WindowEvent + | WindowAlertRequestedEvent + | WindowAuthRequested + | WindowNavigationRejectedEvent + | WindowEndLoadEvent) => any, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Removes the application's icon from the tray. + */ + removeTrayIcon(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restarts the application. + */ + restart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Runs the application. When the application is created, run must be called. + */ + run(callback?: (successObj: SuccessObj) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * Tells the rvm to relaunch the main application once upon a complete shutdown + */ + scheduleRestart(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets new shortcut configuration for current application. + * Application has to be launched with a manifest and has to have shortcut configuration (icon url, name, etc.) in its manifest to + * be able to change shortcut states. + */ + setShortcuts(config: ShortCutConfig, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Adds a customizable icon in the system tray and notifies the application when clicked. + */ + setTrayIcon(iconUrl: string, listener: (clickInfo: TrayIconClickedEvent) => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the application by terminating its process. + */ + terminate(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Waits for a hanging application. This method can be called in response to an application "not-responding" to allow the application + * to continue and to generate another "not-responding" message after a certain period of time. + */ + wait(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * The Application's uuid + */ + uuid: string; + } + + interface ShortCutConfig { + /** + * application has a shortcut on the desktop + */ + desktop?: boolean; + /** + * application has no shortcut in the start menu + */ + startMenu?: boolean; + /** + * application will be launched on system startup + */ + systemStartup?: boolean; + } + + interface SuccessObj { + httpResponseCode: number; + } + + interface NetworkErrorInfo extends ErrorInfo { + networkErrorCode: number; + } + + interface ErrorInfo { + stack: string; + message: string; + } + + interface ApplicationOptions { + /** + * The name of the application. + */ + name?: string; + /** + * The url to the application. + */ + url?: string; + /** + * The UUID of the application, unique within the set of all other applications running in the OpenFin Runtime. name and uuid must match. + */ + uuid?: string; + /** + * Enable Flash at the application level. Default: false. + */ + plugins?: boolean; + /** + * The options of the main window of the application. + */ + mainWindowOptions?: WindowOptions; + } + + interface WindowOptions { + /** + * Enable keyboard shortcuts for devtools and zoom. Default: false for both. + */ + accelerator?: { + devtools?: boolean, + zoom?: boolean, + reload?: boolean, + reloadIgnoreCache?: boolean, + }; + /** + * A flag to always position the window at the top of the window stack. Default: false. + * Updatable + */ + alwaysOnTop?: boolean; + /** + * A flag to automatically show the Window when it is created. Default: false. + */ + autoShow?: boolean; + /** + * A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window. Default: true + * Updatable + */ + contextMenu?: boolean; + /** + * This defines and applies rounded corners for a frameless window. Default for both width and height: 0. + * Updatable + */ + cornerRounding?: { + width?: number; + height?: number; + }; + /** + * A field that the user can attach serializable data to to be ferried around with the window options. Default: ''. + */ + customData?: any; + /** + * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the position from before the window was closed is used. + * This option overrides defaultLeft and defaultTop. Default: false. + */ + defaultCentered?: boolean; + /** + * The default height of the window. Specifies the height of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the height is taken to be the last height of the window before it was closed. Default: 500. + */ + defaultHeight?: number; + /** + * The default left position of the window. Specifies the position of the left of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the value of left is taken to be the last value before the window was closed. Default: 100. + */ + defaultWidth?: number; + /** + * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. + */ + defaultTop?: number; + /** + * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. + * When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. + */ + defaultLeft?: number; + /** + * A flag to show the frame. Default: true. + * Updatable + */ + frame?: boolean; + /** + * A flag to allow a window to be hidden when the close button is clicked.Default: false. + * Updatable + */ + hideOnClose?: boolean; + /** + * A URL for the icon to be shown in the window title bar and the taskbar.Default: The parent application's applicationIcon. + * Updatable + */ + icon?: string; + /** + * The maximum height of a window.Will default to the OS defined value if set to - 1. Default: -1. + * Updatable + */ + maxHeight?: number; + /** + * A flag that lets the window be maximized.Default: true. + * Updatable + */ + maximizable?: boolean; + /** + * The maximum width of a window.Will default to the OS defined value if set to - 1. Default: -1. + * Updatable + */ + maxWidth?: number; + /** + * The minimum height of a window.Default: 0. + * Updatable + */ + minHeight?: number; + /** + * A flag that lets the window be minimized.Default: true. + */ + minimizable?: boolean; + /** + * The minimum width of a window.Default: 0. + */ + minWidth?: number; + /** + * The name for the window which must be unique within the context of the invoking Application. + */ + name?: string; + /** + * A flag that specifies how transparent the window will be.This value is clamped between 0.0 and 1.0.Default: 1.0. + * Updatable + */ + opacity?: number; + /** + * A flag to drop to allow the user to resize the window.Default: true. + * Updatable + */ + resizable?: boolean; + /** + * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window. + * Updatable + */ + resizeRegion?: { + /** + * The size in pixels (Default: 2), + */ + size?: number; + /** + * The size in pixels of an additional + * square resizable region located at the + * bottom right corner of a + * frameless window. (Default: 4) + */ + bottomRightCorner?: number; + }; + /** + * A flag to show the Window's icon in the taskbar. Default: true. + */ + showTaskbarIcon?: boolean; + /** + * A flag to cache the location of the window or not. Default: true. + */ + saveWindowState?: boolean; + /** + * Specify a taskbar group for the window. Default: app's uuid. + */ + taskbarIconGroup?: string; + /** + * A string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal". + */ + state?: string; + /** + * The URL of the window. Default: "about:blank". + */ + url?: string; + /** + * When set to false, the window will render before the "load" event is fired on the content's window. + * Caution, when false you will see an initial empty white window. Default: true. + */ + waitForPageLoad?: boolean; + } + + /** + * Clipboard + * Clipboard API allows reading and writting to the clipboard in multiple formats. + */ + interface OpenFinClipboard { + /** + * Reads available formats for the clipboard type + */ + availableFormats(type: string | null, callback?: (formats: string[]) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Reads available formats for the clipboard type + */ + readHtml(type: string | null, callback?: (html: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as Rtf + */ + readRtf(type: string | null, callback?: (rtf: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Read the content of the clipboard as plain text + */ + readText(type: string | null, callback?: (text: string) => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard + */ + write(data: any, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Html + */ + writeHtml(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as Rtf + */ + writeRtf(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Writes data into the clipboard as plain text + */ + writeText(data: string, type: string | null, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + interface OpenFinExternalApplicationStatic { + /** + * Returns an External Application object that represents an existing external application. + */ + wrap(uuid: string): OpenFinExternalApplication; + } + /** + * ExternalApplication + * An object representing an application. Allows the developer to create, execute, show and close an application, as well as listen to application events. + */ + interface OpenFinExternalApplication { + /** + * Retrieves information about the application. + */ + getInfo(callback?: (info: ExternalApplicationInfo) => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinExternalApplicationEventType, + listener: () => void, + callback?: () => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinExternalApplicationEventType, + listener: () => void, + callback?: () => void, + errorCallback?: (reason: string, error: ErrorInfo) => void): void; + } + + /** + * InterApplicationBus + * A messaging bus that allows for pub/sub messaging between different applications. + */ + interface OpenFinInterApplicationBus { + /** + * Adds a listener that gets called when applications subscribe to the current application's messages. + */ + addSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Adds a listener that gets called when applications unsubscribe to the current application's messages. + */ + addUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered subscribe listener. + */ + removeSubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Removes a previously registered unsubscribe listener. + */ + removeUnsubscribeListener(listener: (uuid: string, topic: string, name: string) => void): void; + /** + * Publishes a message to all applications running on OpenFin Runtime that are subscribed to the specified topic. + */ + publish(topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sends a message to a specific application on a specific topic. + */ + send(destinationUuid: string, name: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + send(destinationUuid: string, topic: string, message: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Subscribes to messages from the specified application on the specified topic. If the subscription is for a uuid, [name], + * topic combination that has already been published to upon subscription you will receive the last 20 missed messages in the order they were published. + */ + subscribe( + senderUuid: string, + name: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + subscribe( + senderUuid: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Unsubscribes to messages from the specified application on the specified topic. + */ + unsubscribe( + senderUuid: string, + name: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + unsubscribe( + senderUuid: string, + topic: string, + listener: (message: any, uuid: string, name: string) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + } + + interface OpenFinNotificationStatic { + /** + * ctor + */ + new (options: NotificationOptions, callback?: () => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinNotification; + /** + * Gets an instance of the current notification. For use within a notification window to close the window or send a message back to its parent application. + */ + getCurrent(): OpenFinNotification; + } + + /** + * Notification + * Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. + * A notification is typically used to alert the user of some important event which requires his or her attention. + * Notifications are a child or your application that are controlled by the runtime. + */ + interface OpenFinNotification { + /** + * Closes the notification. + */ + close(callback?: () => void): void; + /** + * Sends a message to the notification. + */ + sendMessage(message: any, callback?: () => void): void; + /** + * Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback. + */ + sendMessageToApplication(message: any, callback?: () => void): void; + } + + interface NotificationOptions { + /** + * A boolean that will force dismissal even if the mouse is hovering over the notification + */ + ignoreMouseOver?: boolean; + /** + * A message of any primitive or composite-primitive type to be passed to the notification upon creation. + */ + message?: any; + /** + * The timeout for displaying a notification.Can be in milliseconds or "never". + */ + duration?: number | "never"; + /** + * The url of the notification + */ + url?: string; + /** + * A function that is called when a notification is clicked. + */ + onClick?(callback: () => void): void; + /** + * Invoked when the notification is closed via .close() method on the created notification instance + * or the by the notification itself via fin.desktop.Notification.getCurrent().close(). + * NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback see onDismiss + */ + onClose?(callback: () => void): void; + /** + * Invoked when a the notification is dismissed by swiping it off the screen to the right. NOTE: this is no fired on a programmatic close. + */ + onDismiss?(callback: () => void): void; + /** + * A function that is called when an error occurs.The reason for the error is passed as an argument. + */ + onError?(errorCallback: (reason: string, errorObj: NetworkErrorInfo) => void): void; + /** + * The onMessage function will respond to messages sent from notification.sendMessageToApplication. + * The function is passed the message, which can be of any primitive or composite-primitive type. + */ + onMessage?(callback: (message: any) => void): void; + /** + * A function that is called when a notification is shown. + */ + onShow?(callback: (successObj: SuccessObj) => void): void; + } + + /** + * System + * An object representing the core of OpenFin Runtime. + * Allows the developer to perform system-level actions, such as accessing logs, viewing processes, clearing the cache and exiting the runtime. + */ + interface OpenFinSystem { + Clipboard: OpenFinClipboard; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinSystemEventType, + listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Clears cached data containing window state/positions, + * application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. + */ + clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Clears all cached data when OpenFin Runtime exits. + */ + deleteCacheOnExit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Downloads the given application asset + */ + downloadAsset( + assetObj: AppAssetInfo, + progressListener?: (progress: { downloadedBytes: number, totalBytes: number }) => void, + callback?: (successObj: { path: string }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): void; + + /** + * Download preload scripts from given URLs + */ + downloadPreloadScripts(scripts: DownloadPreloadOption[], callback?: (downloadInfo: DownloadPreloadInfo[]) => void, + errorCallback?: (reason: string) => void): void; + /** + * Downloads the given OpenFin Runtime. + */ + downloadRuntime(options: RuntimeDownloadOptions, onProgress?: (progress: RuntimeDownloadProgress) => void, onComplete?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Exits the Runtime. + */ + exit(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Writes any unwritten cookies data to disk. + */ + flushCookieStore(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all applications. + */ + getAllApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data for all external applications. + */ + getAllExternalApplications(callback?: (applicationInfoList: ApplicationInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of data (name, ids, bounds) for all application windows. + */ + getAllWindows(callback?: (windowInfoList: WindowDetails[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns information about the app asset. + */ + getAppAssetInfo(options: AppAssetOptions, callback?: (appAssetInfo: AppAssetInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Get additional info of cookies. + */ + getCookies(option: CookieOption, callback?: (info: CookieInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the command line argument string that started OpenFin Runtime. + */ + getCommandLineArguments(callback?: (args: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the configuration object that started the OpenFin Runtime. + */ + getDeviceId(callback?: (uuid: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns a hex encoded hash of the mac address and the currently logged in user name + */ + getDeviceUserId(callback?: (id: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns an Entity info object relating to the entity specified by the uuid and name passed in. The possible types are 'window', 'iframe', 'external connection' or 'unknown'. + */ + getEntityInfo(uuid: string, name: string, callback?: (info: EntityInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the value of a given environment variable on the computer on which the runtime is installed. + */ + getEnvironmentVariable(envVar: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves currently focused window identity. + */ + getFocusedWindow(callback?: (focusedWindowIdentity: Identity) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves system information. + */ + getHostSpecs(callback?: (info: HostSpecInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the contents of the log with the specified filename. + */ + getLog(logFileName: string, callback?: (variable: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing information for each log file. + */ + getLogList(callback?: (logInfoList: LogInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the minimum (inclusive) logging level that is currently being written to the logs. + */ + getMinLogLevel(callback?: (logLevel: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an object that contains data about the about the monitor setup of the computer that the runtime is running on. + */ + getMonitorInfo(callback?: (monitorInfo: MonitorInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the mouse in virtual screen coordinates (left, top). + */ + getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array of all of the runtime processes that are currently running. + * Each element in the array is an object containing the uuid and the name of the application to which the process belongs. + */ + getProcessList(callback?: (processInfoList: ProcessInfo[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves the Proxy settings. + */ + getProxySettings(callback?: (proxy: ProxyInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns information about the running RVM in an object. + */ + getRvmInfo(callback?: (rvmInfo: RvmInfo) => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the version of the runtime. The version contains the major, minor, build and revision numbers. + */ + getVersion(callback?: (version: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Runs an executable or batch file. + */ + launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Writes the passed message into both the log file and the console. + */ + log(level: "debug" | "info" | "warn" | "error", message: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Monitors a running process. + */ + monitorExternalProcess(options: ExternalProcessInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + /** + * Opens the passed URL in the default web browser. + */ + openUrlWithBrowser(url: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Opens the passed URL in the default web browser. + */ + readRegistryValue(rootKey: string, subkey: string, value: string, callback?: (info: RegistryInfo) => void, + errorCallback?: (reason: string) => void): void; + /** + * This function call will register a unique id and produce a token. The token can be used to broker an external connection. + */ + registerExternalConnection( + uuid: string, + callback?: (detail: { + /** + * this will be unique each time + */ + token: string; + /** + * "remote-connection-uuid" + */ + uuid: string; + }) => void, + errorCallback?: (reason: string) => void): void; + /** + * Removes the process entry for the passed UUID obtained from a prior call of fin.desktop.System.launchExternalProcess(). + */ + releaseExternalProcess(processUuid: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinSystemEventType, + listener: (event: SystemBaseEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent) => void, + callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Set the minimum log level above which logs will be written to the OpenFin log + */ + setMinLogLevel(logLevel: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the Chrome Developer Tools for the specified window. + */ + showDeveloperTools(uuid: string, name: string, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Attempt to close an external process. The process will be terminated if it has not closed after the elapsed timeout in milliseconds. + */ + terminateExternalProcess( + processUuid: string, + timeout: number, + killTree: boolean, + callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, + errorCallback?: (reason: string) => void): void; + terminateExternalProcess( + processUuid: string, + timeout: number, + callback?: (info: { result: "clean" | "terminated" | "failed" }) => void, + errorCallback?: (reason: string) => void): void; + /** + * Update the OpenFin Runtime Proxy settings. + */ + updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface CacheOptions { + cache?: boolean; + cookies?: boolean; + localStorage?: boolean; + appcache?: boolean; + userData?: boolean; + } + + interface AppAssetInfo { + src?: string; + alias?: string; + version?: string; + target?: string; + args?: string; + mandatory?: boolean; + } + + interface AppAssetOptions { + alias: string; + } + + interface ApplicationInfo { + /** + * true when the application is running. + */ + isRunning?: boolean; + /** + * uuid of the application. + */ + uuid?: string; + /** + * uuid of the application that launches this application. + */ + parentUuid?: string; + } + + interface Identity { + uuid: string; + name: string; + } + + interface EntityInfo { + name: string; + uuid: string; + parent: Identity; + entityType: string; + } + + interface DownloadPreloadOption { + url: string; + } + + interface DownloadPreloadInfo { + success: boolean; + url?: string; + error: string; + } + + interface CookieInfo { + name: string; + // expirationDate: Date; + domain: string; + path: string; + } + + interface CookieOption { + name: string; + } + + interface RegistryInfo { + data: any; + rootKey: string; + subkey: string; + type: string; + value: string; + } + + interface RuntimeDownloadOptions { + version: string; + } + + interface RuntimeDownloadProgress { + downloadedBytes: number; + totalBytes: number; + } + + interface WindowDetails { + uuid?: string; + mainWindow?: WindowInfo; + childWindows?: WindowInfo[]; + } + + interface WindowInfo { + /** + * name of the child window + */ + name?: string; + /** + * top-most coordinate of the child window + */ + top?: number; + /** + * right-most coordinate of the child window + */ + right?: number; + /** + * bottom-most coordinate of the child window + */ + bottom?: number; + /** + * left-most coordinate of the child window + */ + left?: number; + } + + interface HostSpecInfo { + /** + * "x86" for 32-bit or "x86_64" for 64-bit + */ + arch: string; + /** + * Same payload as Node's os.cpus() + */ + cpus: NodeCpuInfo[]; + gpu: { + /** + * Graphics card name + */ + name: string; + }; + /** + * Same payload as Node's os.totalmem() + */ + memory: number; + /** + * OS name and version/edition + */ + name: string; + } + + interface NodeCpuInfo { + model: string; + /** + * in MHz + */ + speed: number; + times: { + /** + * The number of milliseconds the CPU has spent in user mode. + */ + user: number; + /** + * The number of milliseconds the CPU has spent in nice mode. + */ + nice: number; + /** + * The number of milliseconds the CPU has spent in sys mode. + */ + sys: number; + /** + * The number of milliseconds the CPU has spent in idle mode. + */ + idle: number; + /** + * The number of milliseconds the CPU has spent in irq mode. + */ + irq: number; + }; + } + + interface LogInfo { + /** + * the filename of the log + */ + name?: string; + /** + * the size of the log in bytes + */ + size?: number; + /** + * the unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)" + */ + date?: string; + } + + interface ProcessInfo { + /** + * the percentage of total CPU usage + */ + cpuUsage?: number; + /** + * the application name + */ + name?: string; + /** + * the current nonpaged pool usage in bytes + */ + nonPagedPoolUsage?: number; + /** + * the number of page faults + */ + pageFaultCount?: number; + /** + * the current paged pool usage in bytes + */ + pagedPoolUsage?: number; + /** + * the total amount of memory in bytes that the memory manager has committed + */ + pagefileUsage?: number; + /** + * the peak nonpaged pool usage in bytes + */ + peakNonPagedPoolUsage?: number; + /** + * the peak paged pool usage in bytes + */ + peakPagedPoolUsage?: number; + /** + * the peak value in bytes of pagefileUsage during the lifetime of this process + */ + peakPagefileUsage?: number; + /** + * the peak working set size in bytes + */ + peakWorkingSetSize?: number; + /** + * the native process identifier + */ + processId?: number; + /** + * the application UUID + */ + uuid?: string; + /** + * the current working set size (both shared and private data) in bytes + */ + workingSetSize?: number; + } + + interface ProxyInfo { + /** + * the configured Proxy Address + */ + proxyAddress?: string; + /** + * the configured Proxy port + */ + proxyPort?: number; + /** + * Proxy Type + */ + type?: string; + } + + interface RvmInfo { + version?: string; + "start-time"?: string; + } + + interface ExternalProcessLaunchInfo { + path?: string; + /** + * Additionally note that the executable found in the zip file specified in appAssets + * will default to the one mentioned by appAssets.target + * If the the path below refers to a specific path it will override this default + */ + alias?: string; + /** + * When using alias; if no arguments are passed then the arguments (if any) + * are taken from the 'app.json' file, from the 'args' parameter + * of the 'appAssets' Object with the relevant 'alias'. + * If 'arguments' is passed as a parameter it takes precedence + * over any 'args' set in the 'app.json'. + */ + arguments?: string; + listener?(result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }): void; + certificate?: CertificationInfo; + } + + interface CertificationInfo { + /** + * A hex string with or without spaces + */ + serial?: string; + /** + * An internally tokenized and comma delimited string allowing partial or full checks of the subject fields + */ + subject?: string; + /** + * A hex string with or without spaces + */ + publickey?: string; + /** + * A hex string with or without spaces + */ + thumbprint?: string; + /** + * A boolean indicating that the certificate is trusted and not revoked + */ + trusted?: boolean; + } + + interface ExternalProcessInfo { + pid?: number; + listener?(result: { + /** + * "Exited" Or "released" on a call to releaseExternalProcess + */ + topic?: string; + /** + * The mapped UUID which identifies the launched process + */ + uuid?: string; + /* + * Process exit code + */ + exitCode?: number; + }): void; + } + + interface OpenFinWindowStatic { + /** + * Class: Window + * + * new Window(options, callbackopt, errorCallbackopt) + * + * Creates a new OpenFin Window + * + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * The new window appears in the same process as the parent window. + * @param options - The options of the window + * @param [callback] - Called if the window creation was successful + * @param [callback.successObj] - httpResponseCode + */ + new ( + options: WindowOptions, + callback?: (successObj: { httpResponseCode: number }) => void, + errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinWindow; + /** + * Returns an instance of the current window. + * @returns Current window + */ + getCurrent(): OpenFinWindow; + /** + * Returns a Window object that wraps an existing window. + */ + wrap(appUuid: string, windowName: string): OpenFinWindow; + } + + /** + * Window + * A basic window that wraps a native HTML window. Provides more fine-grained control over the window state such as the ability to minimize, + * maximize, restore, etc. By default a window does not show upon instantiation; instead the window's show() method must be invoked manually. + * The new window appears in the same process as the parent window. + */ + interface OpenFinWindow { + /** + * uuid of the application that the window belongs to. + */ + uuid: string; + /** + * Name of window + */ + name: string; + /** + * Returns the native JavaScript "window" object for the window. This method can only be used by the parent application or the window itself, + * otherwise it will return undefined. The same Single-Origin-Policy (SOP) rules apply for child windows created by window.open(url) in that the + * contents of the window object are only accessible if the URL has the same origin as the invoking window. See example below. + * Also, will not work with fin.desktop.Window objects created with fin.desktop.Window.wrap(). + * @returns Native window + */ + getNativeWindow(): Window; + /** + * Gets the parent application. + * @returns Parent application + */ + getParentApplication(): OpenFinApplication; + /** + * Gets the parent window. + */ + getParentWindow(): OpenFinWindow; + /** + * Registers an event listener on the specified event. + */ + addEventListener( + type: OpenFinWindowEventType, + listener: (event: WindowBaseEvent + | WindowAuthRequestedEvent + | WindowBoundsEvent + | WindowExternalProcessStartedEvent + | WindowExternalProcessExited + | WindowGroupChangedEvent + | WindowHiddenEvent + | Window_NavigationRejectedEvent) => void, + callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Performs the specified window transitions + */ + animate(transitions: AnimationTransition, options: AnimationOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; + /** + * Provides credentials to authentication requests + */ + authenticate(userName: string, password: string, callback?: () => void, errorCallback?: (reason: string, error: ErrorInfo) => void): void; + /** + * Removes focus from the window. + */ + blur(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Brings the window to the front of the OpenFin window stack. + */ + bringToFront(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Closes the window. + * @param Close will be prevented from closing when force is false and 'close-requested' has been subscribed to for application's main window. + */ + close(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Prevents a user from changing a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-disabled' is generated when an enabled frame becomes disabled. + */ + disableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Re-enables user changes to a window's size/position when using the window's frame. + * 'disabled-frame-bounds-changing' is generated at the start of and during a user move/size operation. + * 'disabled-frame-bounds-changed' is generated after a user move/size operation. + * The events provide the bounds that would have been applied if the frame was enabled. + * 'frame-enabled' is generated when a disabled frame has becomes enabled. + */ + enableFrame(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Flashes the window's frame and taskbar icon until the window is activated. + */ + flash(options?: any, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gives focus to the window. + */ + focus(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current bounds (top, left, width, height) of the window. + */ + getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; + /** + * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. + * Please note that calling window is included in the result array. + */ + getGroup(callback?: (group: OpenFinWindow[]) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current settings of the window. + */ + getOptions(callback?: (options: WindowOptions) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets a base64 encoded PNG snapshot of the window. + */ + getSnapshot(callback?: (base64Snapshot: string) => void, errorCallback?: (reason: string) => void): void; + /** + * Gets the current state ("minimized", "maximized", or "restored") of the window. + */ + getState(callback?: (state: "minimized" | "maximized" | "restored") => void, errorCallback?: (reason: string) => void): void; + /** + * Returns the zoom level of the window. + */ + getZoomLevel(callback?: (level: number) => void, errorCallback?: (reason: string) => void): void; + /** + * Hides the window. + */ + hide(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Determines if the window is currently showing. + */ + isShowing(callback?: (showing: boolean) => void, errorCallback?: (reason: string) => void): void; + /** + * Joins the same window group as the specified window. + */ + joinGroup(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Leaves the current window group so that the window can be move independently of those in the group. + */ + leaveGroup(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Maximizes the window. + */ + maximize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Merges the instance's window group with the same window group as the specified window + */ + mergeGroups(target: OpenFinWindow, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Minimizes the window. + */ + minimize(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window by a specified amount. + */ + moveBy(deltaLeft: number, deltaTop: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Moves the window to a specified location. + */ + moveTo(left: number, top: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Removes a previously registered event listener from the specified event. + */ + removeEventListener( + type: OpenFinWindowEventType, + listener: (event: WindowBaseEvent + | WindowAuthRequestedEvent + | WindowBoundsEvent + | WindowExternalProcessStartedEvent + | WindowExternalProcessExited + | WindowGroupChangedEvent + | WindowHiddenEvent + | Window_NavigationRejectedEvent) => void, + callback?: () => void, + errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeBy(deltaWidth: number, deltaHeight: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Resizes the window by a specified amount. + */ + resizeTo(width: number, height: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Restores the window to its normal state (i.e., unminimized, unmaximized). + */ + restore(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Will bring the window to the front of the entire stack and give it focus. + */ + setAsForeground(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the window's size and position + */ + setBounds(left: number, top: number, width: number, height: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Sets the zoom level of the window. + */ + setZoomLevel(level: number, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden. + * @param Show will be prevented from closing when force is false and 'show-requested' has been subscribed to for application's main window. + */ + show(force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Shows the window if it is hidden at the specified location. If the toggle parameter is set to true, the window will alternate between showing and hiding. + */ + showAt(left: number, top: number, force?: boolean, callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Stops the taskbar icon from flashing. + */ + stopFlashing(callback?: () => void, errorCallback?: (reason: string) => void): void; + /** + * Updates the window using the passed options + */ + updateOptions(options: WindowOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface OpenFinFrameStatic { + wrap(uuid: string, name: string): OpenFinFrame; + + getCurrent(): OpenFinFrame; + } + + interface OpenFinFrame { + name: string; + uuid: string; + + addEventListener(type: string, listener: () => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + + getParentWindow(callback?: (entityInfo: EntityInfo) => void, errorCallback?: (reason: string) => void): void; + + getInfo(callback?: (entityInfo: EntityInfo) => void, errorCallback?: (reason: string) => void): void; + + removeEventListener(type: string, listener: () => void, callback?: () => void, errorCallback?: (reason: string) => void): void; + } + + interface ApplicationBaseEvent { + topic: string; + type: OpenFinApplicationEventType; + uuid: string; + } + + interface TrayIconClickedEvent extends ApplicationBaseEvent { + button: number; // 0 for left, 1 for middle, 2 for right + monitorInfo: MonitorInfo; + x: number; // the cursor x coordinate + y: number; // the cursor y coordinate + } + + interface WindowEvent extends ApplicationBaseEvent { + name: string; + } + + interface WindowAlertRequestedEvent extends WindowEvent { + message: string; + url: string; + } + + interface WindowAuthRequested extends WindowEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowNavigationRejectedEvent extends WindowEvent { + sourceName: string; + url: string; + } + + interface WindowEndLoadEvent extends WindowEvent { + documentName: string; + isMain: boolean; + } + + interface MonitorInfoChangedEvent extends MonitorInfo { + topic: "system"; + type: "monitor-info-changed"; + } + + interface MonitorInfo { + nonPrimaryMonitors: MonitorInfoDetail[]; + primaryMonitor: MonitorInfoDetail; + reason: string; + taskbar: { + edge: "left" | "right" | "top" | "bottom", + rect: MontiorCoordinates + }; + topic: "system"; + type: "monitor-info-changed"; + virtualScreen: MontiorCoordinates; + } + + interface TrayIconInfo { + x: number; + y: number; + bounds: { + x: number; + y: number; + width: number; + height: number; + }; + monitorInfo: MonitorInfo; + } + + interface MonitorInfoDetail { + availableRect: MontiorCoordinates; + deviceId: string; + displayDeviceActive: boolean; + monitorRect: MontiorCoordinates; + name: string; + } + + interface MontiorCoordinates { + bottom: number; + left: number; + right: number; + top: number; + } + + interface VirtualScreenCoordinates { + left: number; + top: number; + } + + interface SystemBaseEvent { + topic: string; + type: OpenFinSystemEventType; + uuid: string; + } + + interface DesktopIconClickedEvent { + mouse: { + /** + * the left virtual screen coordinate of the mouse + */ + left: number, + /** + * the top virtual screen coordinate of the mouse + */ + top: number + }; + /** + * the number of milliseconds that have elapsed since the system was started, + */ + tickCount: number; + topic: "system"; + type: "desktop-icon-clicked"; + } + + interface IdleStateChangedEvent { + /** + * How long in milliseconds since the user has been idle. + */ + elapsedTime: number; + /** + * true when the user is idle,false when the user has returned; + */ + isIdle: boolean; + topic: "system"; + type: "idle-state-changed"; + } + + interface WindowBaseEvent { + /** + * the name of the window + */ + name: string; + /** + * always window + */ + topic: "window"; + /** + * window event type + */ + type: OpenFinWindowEventType; + /** + * the UUID of the application the window belongs to + */ + uuid: string; + } + + interface WindowAuthRequestedEvent extends WindowBaseEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; + } + + interface WindowBoundsEvent extends WindowBaseEvent { + /** + * describes what kind of change occurred. + * 0 means a change in position. + * 1 means a change in size. + * 2 means a change in position and size. + */ + changeType: number; + /** + * true when pending changes have been applied to the window. + */ + deferred: boolean; + /** + * the new height of the window. + */ + height: number; + /** + * the left-most coordinate of the window. + */ + left: number; + /** + * the top-most coordinate of the window. + */ + top: number; + + type: "bounds-changed" | "bounds-changing" | "disabled-frame-bounds-changed" | "disabled-frame-bounds-changing"; + /** + * the new width of the window. + */ + width: number; + } + + interface WindowExternalProcessStartedEvent extends WindowBaseEvent { + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-started"; + } + + interface WindowExternalProcessExited extends WindowBaseEvent { + /** + * the process exit code + */ + exitCode: number; + /** + * the process handle uuid + */ + processUuid: string; + type: "external-process-exited"; + } + + interface WindowGroupChangedEvent extends WindowBaseEvent { + /** + * Which group array the window that the event listener was registered on is included in: + * 'source' The window is included in sourceGroup. + * 'target' The window is included in targetGroup. + * 'nothing' The window is not included in sourceGroup nor targetGroup. + */ + memberOf: "source" | "target" | "nothing"; + /** + * The reason this event was triggered. + * 'leave' A window has left the group due to a leave or merge with group. + * 'join' A window has joined the group. + * 'merge' Two groups have been merged together. + * 'disband' There are no other windows in the group. + */ + reason: "leave" | "join" | "merge" | "disband"; + /** + * All the windows in the group the sourceWindow originated from. + */ + sourceGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the sourceWindow belongs to The source window is the window in which (merge/join/leave)group(s) was called. + */ + sourceWindowAppUuid: string; + /** + * the name of the sourcewindow.The source window is the window in which(merge / join / leave) group(s) was called. + */ + sourceWindowName: string; + /** + * All the windows in the group the targetWindow orginated from + */ + targetGroup: WindowOfGroupInfo[]; + /** + * The UUID of the application the targetWindow belongs to. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowAppUuid: string; + /** + * The name of the targetWindow. The target window is the window that was passed into (merge/join) group(s). + */ + targetWindowName: string; + type: "group-changed"; + } + + interface WindowOfGroupInfo { + /** + * The UUID of the application this window entry belongs to. + */ + appUuid: string; + /** + * The name of this window entry. + */ + windowName: string; + } + + interface WindowHiddenEvent extends WindowBaseEvent { + /** + * What action prompted the close. + * The reasons are: "hide", "hide-on-close" + */ + reason: "hide" | "hide-on-close"; + type: "hidden"; + } + + interface Window_NavigationRejectedEvent { + name: string; + /** + * source of navigation window name + */ + sourceName: string; + topic: "navigation-rejected"; + /** + * Url that was not reached "http://blocked-content.url" + */ + url: string; + /** + * the UUID of the application the window belongs to. + */ + uuid: string; + } + + interface AnimationTransition { + opacity?: { + /** + * This value is clamped from 0.0 to 1.0 + */ + opacity?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'opacity' as absolute or as a delta. Defaults to false. + */ + relative?: boolean; + }; + position?: { + /** + * Defaults to the window's current left position in virtual screen coordinates. + */ + left?: number; + /** + * Defaults to the window's current top position in virtual screen coordinates. + */ + top?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'left' and 'top' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + size?: { + /** + * Optional if height is present. Defaults to the window's current width. + */ + width?: number; + /** + * Optional if width is present. Defaults to the window's current height. + */ + height?: number; + /** + * The total time in milliseconds this transition should take. + */ + duration?: number; + /** + * Treat 'width' and 'height' as absolute or as deltas. Defaults to false. + */ + relative?: boolean; + }; + } + + interface AnimationOptions { + /** + * This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue. + */ + interrupt?: boolean; + /** + * Transition effect. Defaults to 'ease-in-out'. + */ + tween?: OpenFinTweenType; + } + + interface WindowBounds { + /** + * the height of the window. + */ + height?: number; + /** + * left-most coordinate of the window. + */ + left?: number; + /** + * top-most coordinate of the window. + */ + top?: number; + /** + * the width of the window. + */ + width?: number; + } + + interface ExternalApplicationInfo { + parent: { + uuid: string; + name: string; + }; + } + + interface SessionChangedEvent { + /** + * the action that triggered this event: + */ + reason: "lock" + | "unlock" + | "remote-connect" + | "remote-disconnect" + | "unknown"; + topic: "system"; + type: "session-changed"; + } + + interface LaunchInfo { + launchMode: "fin-protocol" + | "fins-protocol" + | "shortcut" + | "command-line" + | "adapter" + | "other" + | string; + } + + type OpenFinTweenType = "linear" + | "ease-in" + | "ease-out" + | "ease-in-out" + | "ease-in-quad" + | "ease-out-quad" + | "ease-in-out-quad" + | "ease-in-cubic" + | "ease-out-cubic" + | "ease-in-out-cubic" + | "ease-out-bounce" + | "ease-in-back" + | "ease-out-back" + | "ease-in-out-back" + | "ease-in-elastic" + | "ease-out-elastic" + | "ease-in-out-elastic"; + + type OpenFinApplicationEventType = "closed" + | "connected" + | "crashed" + | "initialized" + | "manifest-changed" + | "not-responding" + | "out-of-memory" + | "responding" + | "run-requested" + | "started" + | "tray-icon-clicked" + | "window-alert-requested" + | "window-auth-requested" + | "window-closed" + | "window-created" + | "window-end-load" + | "window-navigation-rejected" + | "window-show-requested" + | "window-start-load"; + + type OpenFinExternalApplicationEventType = "connected" + | "disconnected"; + + type OpenFinSystemEventType = "application-closed" + | "application-crashed" + | "application-created" + | "application-started" + | "desktop-icon-clicked" + | "idle-state-changed" + | "monitor-info-changed" + | "session-changed"; + + type OpenFinWindowEventType = "auth-requested" + | "blurred" + | "bounds-changed" + | "bounds-changing" + | "close-requested" + | "closed" + | "disabled-frame-bounds-changed" + | "disabled-frame-bounds-changing" + | "embedded" + | "external-process-exited" + | "external-process-started" + | "focused" + | "frame-disabled" + | "frame-enabled" + | "group-changed" + | "hidden" + | "initialized" + | "maximized" + | "minimized" + | "navigation-rejected" + | "restored" + | "show-requested" + | "shown"; + + type OpenFinAnchor = "top-left" + | "top-right" + | "bottom-left" + | "bottom-right"; +} diff --git a/types/openfin/v34/openfin-tests.ts b/types/openfin/v34/openfin-tests.ts new file mode 100644 index 0000000000..6059f54de7 --- /dev/null +++ b/types/openfin/v34/openfin-tests.ts @@ -0,0 +1,800 @@ +function test_application() { + let application: fin.OpenFinApplication; + // constructor + application = new fin.desktop.Application({ + url: "application.html", + uuid: "74BED629-2D8E-4141-8582-73E364BDFA74", + name: "Application Name", + plugins: false, + mainWindowOptions: { + defaultHeight: 600, + defaultWidth: 800, + defaultTop: 300, + defaultLeft: 300, + autoShow: true + } + }, (successObj) => { + console.log("Application successfully created, HTTP response code:", successObj); + application.run(); + }, (error) => { + console.log("Error creating application:", error); + }); + // createFromManifest + fin.desktop.Application.createFromManifest("http://stuf.com/app.json", (app) => { + console.log(app.uuid); + }, err => console.log(err)); + // getCurrent + application = fin.desktop.Application.getCurrent(); + // wrap + application = fin.desktop.Application.wrap("454C7F31-A915-4EA2-83F2-CFA655453C52"); + // getWindow + application.getWindow(); + // addEventListener + application.addEventListener("closed", (event) => { + console.log("The application has closed"); + }, () => { + console.log("The registration was successful"); + }, reason => { + console.log("failure: " + reason); + }); + // close + application.close(); + // getChildWindows + application.getChildWindows(children => { + children.forEach(childWindow => { + console.log("Showing child: " + childWindow.name); + childWindow.show(); + }); + }); + // getGroups + application.getGroups(allGroups => { + console.log(`There are a total of ${allGroups.length} groups.`); + + let groupCounter = 1; + allGroups.forEach(windowGroup => { + console.log(`Group ${groupCounter} contains ${windowGroup.length} windows.`); + ++groupCounter; + }); + }); + // getManifest + application.getManifest(manifest => { + console.log("Application manifest:"); + console.log(manifest); + }); + // getParentUuid + application.getParentUuid(parentUuid => { + console.log("UUID of parent application:"); + console.log(parentUuid); + }); + // getShortcuts + application.getShortcuts(config => { + console.log("Desktop shortcut is enabled: ", config.desktop); + console.log("Start Menu shortcut is enabled: ", config.startMenu); + console.log("System Startup shortcut is enabled: ", config.systemStartup); + }); + // getInfo + application.getInfo(info => { + console.log(`Launch mode: ${info.launchMode}`); + }); + // getTrayIconInfo + application.getTrayIconInfo(info => { + console.log(info.x, info.y, info.bounds.x, info.bounds.y, info.bounds.height, info.bounds.width, + info.monitorInfo.type, info.monitorInfo.reason); + }); + // isRunning + application.isRunning(running => { + console.log("the application is", running ? "running" : "not running"); + }); + // registerCustomData + application.registerUser("a", "b", () => console.log("done"), err => console.log(err)); + // removeEventListener + application.removeEventListener("closed", (event: any) => { + console.log(event); + }, () => { + console.log("The unregistration was successful"); + }, err => { + console.log("failure:", err); + }); + // removeTrayIcon + application.removeTrayIcon(() => { + console.log("Removed the tray icon."); + }, err => { + console.log("failure:", err); + }); + // restart + application.restart(() => { + console.log("You will not read this."); + }, err => { + console.log("failure:", err); + }); + // schedule restart + application.scheduleRestart(() => { + console.log("You will not read this."); + }, err => { + console.log("failure:", err); + }); + // setShortcuts + application.setShortcuts({ + desktop: true, + startMenu: false, + systemStartup: true + }, () => { + console.log("Successfully set new shortcut states"); + }, error => { + console.log("Failed to set new shortcut states. Error: ", error); + }); + // setTrayIcon + application.setTrayIcon("https://developer.openf.in/download/openfin.png", clickInfo => { + console.log(`The mouse has clicked at (${clickInfo.x}, ${clickInfo.y})`); + }); + // terminate + application.terminate(); + // wait + application.addEventListener("not-responding", () => { + console.log("waiting for hung application"); + application.wait(); + }); + // uuid + const hasUuid = application.uuid; +} + +function test_external_application() { + let externalApp: fin.OpenFinExternalApplication; + // wrap + externalApp = fin.desktop.ExternalApp.wrap('my-uuid'); + // addEventListener + externalApp.addEventListener('connected', () => { + console.log('external app connected'); + }, () => { + console.log('The registration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); + // removeEventListener + const previousCallback = () => { }; + externalApp.removeEventListener('connected', previousCallback, () => { + console.log('The unregistration was successful'); + }, (reason, err) => { + console.log(`Error Message: ${err.message} Error Stack: ${err.stack}`); + }); + + // getInfo + externalApp.getInfo(info => { + console.log(info.parent.uuid, info.parent.name); + }, err => console.log(err)); +} + +function test_inter_application_bus() { + // addSubscribeListener + fin.desktop.InterApplicationBus.addSubscribeListener((uuid, topic, name) => { + console.log(`The application ${uuid} has subscribed to ${topic}`); + }); + // addUnsubscribeListener + fin.desktop.InterApplicationBus.addUnsubscribeListener((uuid, topic, name) => { + console.log(`The application ${uuid} has unsubscribed to ${topic}`); + }); + // removeSubscribeListener + const aRegisteredListener = (uuid: string, topic: string, name: string) => { }; + fin.desktop.InterApplicationBus.removeSubscribeListener(aRegisteredListener); + // removeUnsubscribeListener + fin.desktop.InterApplicationBus.removeUnsubscribeListener(aRegisteredListener); + // publish + fin.desktop.InterApplicationBus.publish("a topic", { + field1: "value1", + field2: "value2" + }); + // send + fin.desktop.InterApplicationBus.send("an application's uuid", "a topic", { + field1: "value1", + field2: "value2" + }); + // subscribe + fin.desktop.InterApplicationBus.subscribe("*", "a topic", (message, uuid, name) => { + console.log(`The application ${uuid} sent this message: ${message}`); + }); + // unsubscribe + const aRegisteredMessageListener = (message: any, senderUuid: string) => { + console.log(message, senderUuid); + }; + fin.desktop.InterApplicationBus.unsubscribe("*", "a topic", aRegisteredMessageListener); +} + +function test_notification() { + let notification: fin.OpenFinNotification; + // getCurrent + notification = fin.desktop.Notification.getCurrent(); + // close + notification.close(); + // sendMessage + notification = new fin.desktop.Notification({ + duration: 10, + url: "http://localhost:5000/Account/Register", + message: "Hello", + onShow: () => { }, + // onClose: () => { }, + onDismiss: () => { }, + // onClick: () => { }, + onMessage: () => { }, + onError: () => { } + }); + // sendMessageToApplication + notification.sendMessageToApplication("some message"); +} + +function test_system() { + // addEventListener + fin.desktop.System.addEventListener('monitor-info-changed', event => { + console.log("The monitor information has changed to: ", event); + }, () => { + console.log("The registration was successful"); + }, err => { + console.log("failure: " + err); + }); + // clearCache + fin.desktop.System.clearCache({ + cache: true, + cookies: true, + localStorage: true, + appcache: true, + userData: true + }); + // deleteCacheOnExit + fin.desktop.System.deleteCacheOnExit(() => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // downloadAsset + const dirAppAsset = { + src: 'http://local:8000/dir.zip', + alias: 'dirApp', + version: '1.23.24', + target: 'dir.bat', + args: '' + }; + fin.desktop.System.downloadAsset(dirAppAsset, progress => { + const downloadedPercent = Math.floor((progress.downloadedBytes / progress.totalBytes) * 100); + console.log(`Downloaded ${downloadedPercent}%`); + }, p => { + console.log(`Downlod complete, can be found on ${p.path}`); + // lets launch our application asset. + // launchDirApp(); + }, (reason, err) => { + console.log(reason, err); + }); + // downloadRuntime + fin.desktop.System.downloadRuntime({ version: '9.61.31.56' }, progress => { + console.log(progress.downloadedBytes, progress.downloadedBytes); + }, () => console.log('download complete'), err => console.error(err)); + // downloadPreloadScript + const preloadScripts = [ + { url: 'http://whatever.com/script.js' } + ]; + fin.desktop.System.downloadPreloadScripts(preloadScripts, info => { + const downloadInfo = info[0]; + console.log(downloadInfo.success, downloadInfo.url, downloadInfo.error); + }, err => { + console.log(err); + }); + // exit + fin.desktop.System.exit(() => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // flushCookieStore + fin.desktop.System.flushCookieStore(() => { + console.log('successful'); + }, err => { + console.log('failure', err); + }); + // getAllApplications + fin.desktop.System.getAllApplications(applicationInfoList => { + applicationInfoList.forEach(applicationInfo => { + console.log("Showing information for application with uuid: " + + applicationInfo.uuid); + console.log("isRunning: ", applicationInfo.isRunning); + }); + }); + // getAllExternalApplications + fin.desktop.System.getAllExternalApplications(externalAppsInfoList => { + externalAppsInfoList.forEach(appInfo => { + console.log(`External app connected to the runtime with UUID ${appInfo.uuid}`); + }); + }); + // getAllWindows + fin.desktop.System.getAllWindows(windowInfoList => { + windowInfoList.forEach(windowInfo => { + console.log("Showing information for application with uuid: ", windowInfo.uuid); + console.log("Main window: ", windowInfo.mainWindow); + console.log("Child windows: ", windowInfo.childWindows); + }); + }); + // getAppAssetInfo + fin.desktop.System.getAppAssetInfo({ alias: 'myAppAsset' }, info => { + console.log(info.alias, info.args, info.mandatory, info.src, info.target, info.version); + }, err => console.log(err)); + // getCommandLineArguments + fin.desktop.System.getCommandLineArguments(args => { + console.log("The command line arguments are " + args); + }); + // getCookieInfo + fin.desktop.System.getCookies({ name: 'myCookie1'}, cookies => { + const cookie1 = cookies[0]; + console.log(cookie1.name, cookie1.domain, cookie1.path); + }, err => console.log(err)); + // getDeviceId + fin.desktop.System.getDeviceId(id => { + console.log("The id of the device is: " + id); + }); + // getDeviceUserId + fin.desktop.System.getDeviceUserId(id => console.log(id), err => console.error(err)); + // getEntityInfo + fin.desktop.System.getEntityInfo('uuid', 'name', info => { + console.log(info.entityType, info.name, info.uuid, info.parent.name, info.parent.uuid); + }, err => console.log(err)); + // getEnvironmentVariable + fin.desktop.System.getEnvironmentVariable("APPDATA", variable => { + console.log("this is the APPDATA value", variable); + }); + // getFocusedWindow + fin.desktop.System.getFocusedWindow(win => { + console.log(win.uuid, win.name); + }, err => console.log(err)); + // getHostSpecs + fin.desktop.System.getHostSpecs(info => { + console.log(info); + }, error => { + console.log('There was an error:', error); + }); + // getLog + fin.desktop.System.getLog('debug-2015-01-08-22-27-53.log', log => { + console.log(log); + }); + // getLogList + fin.desktop.System.getLogList(logList => { + logList.forEach(logInfo => { + console.log(`The filename of the log is ${logInfo.name}, the size is ${logInfo.size}, and the date of creation is ${logInfo.date}`); + }); + }); + // getMinLogLevel + fin.desktop.System.getMinLogLevel(level => console.log(level), err => console.log(err)); + // getMonitorInfo + fin.desktop.System.getMonitorInfo(monitorInfo => { + console.log("This object contains information about all monitors: ", monitorInfo); + }); + // getMousePosition + fin.desktop.System.getMousePosition(mousePosition => { + console.log(`The mouse is located at left: ${mousePosition.left}, top: ${mousePosition.top}`); + }); + // getProcessList + fin.desktop.System.getProcessList(list => { + list.forEach(process => { + console.log(`UUID: ${process.uuid}, Application Name: ${process.name}`); + }); + }); + // getProxySettings + fin.desktop.System.getProxySettings(proxy => { + console.log(proxy); + }); + // getRvmInfo + fin.desktop.System.getRvmInfo(rvmInfoObject => { + console.log("RVM version:", rvmInfoObject.version); + console.log("RVM has been running since:", rvmInfoObject["start-time"]); + }, err => { + console.log("Failed to get rvm info, error message:", err); + }); + // getVersion + fin.desktop.System.getVersion(version => { + console.log("The version is " + version); + }); + // launchExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // launch external process with an alias + fin.desktop.System.launchExternalProcess({ + // Additionally note that the executable found in the zip file specified in appAssets + // will default to the one mentioned by appAssets.target + // If the the path below refers to a specific path it will override this default + alias: "myApp", + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + alias: "myApp", + arguments: "e f g", + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // + fin.desktop.System.launchExternalProcess({ + path: "C:\Users\ExampleUser\AppData\Local\OpenFin\OpenFinRVM.exe", + arguments: "--version", + certificate: { + trusted: true, + subject: 'O=OpenFin INC., L=New York, S=NY, C=US', + thumbprint: '3c a5 28 19 83 05 fe 69 88 e6 8f 4b 3a af c5 c5 1b 07 80 5b' + }, + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log('Success:', payload.uuid); + }, error => { + console.log('Error:', error); + }); + // log + fin.desktop.System.log("info", "An example log message", () => { + console.log("message successfully logged"); + }, err => { + console.log(err); + }); + // monitorExternalProcess + fin.desktop.System.monitorExternalProcess({ + pid: 2508, + listener(result) { + console.log('the exit code', result.exitCode); + } + }, payload => { + console.log("The process is now being monitored: ", payload.uuid); + }, error => { + console.log("Error:", error); + }); + // openUrlWithBrowser + fin.desktop.System.openUrlWithBrowser("https://developer.openf.in/", () => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // readRegistryValue + fin.desktop.System.readRegistryValue('HKEY_SOMETHING', 'HARDWARE\\SOMETHING', 'BootSomething', info => { + console.log(info.data, info.rootKey, info.subkey, info.type, info.value); + }, err => console.log(err)); + // registerExternalConnection + fin.desktop.System.registerExternalConnection("remote-connection-uuid", (...args: any[]) => { + console.log(args); + }); + // releaseExternalProcess + fin.desktop.System.launchExternalProcess({ + path: "notepad", + arguments: "", + listener(result) { + console.log("The exit code", result.exitCode); + } + }, result => { + console.log("Result UUID is " + result.uuid); + + // release it. + fin.desktop.System.releaseExternalProcess(result.uuid, () => { + console.log("Process has been unmapped!"); + }, reason => { + console.log("failure: " + reason); + }); + }); + // removeEventListener + fin.desktop.System.removeEventListener("monitor-info-changed", (event) => { + console.log(event); + }, () => { + console.log("successful"); + }, (err: any) => { + console.log("failure: " + err); + }); + // setMinLogLevel + fin.desktop.System.setMinLogLevel("log level", () => console.log('Success'), (err: any) => console.error(err)); + // showDeveloperTools + fin.desktop.System.showDeveloperTools("uuid", "name", () => { + console.log("successful"); + }, err => { + console.log("failure: " + err); + }); + // terminateExternalProcess + fin.desktop.System.launchExternalProcess({ + // notepad is in the system's PATH + path: "notepad", + arguments: "", + listener(result) { + console.log("The exit code", result.exitCode); + } + }, result => { + console.log("Result UUID is " + result.uuid); + + // Attempt to close the process. Terminate after 4 seconds if it + // has not done so. + fin.desktop.System.terminateExternalProcess(result.uuid, 4000, info => { + console.log("Termination result " + info.result); + }, reason => { + console.log("failure: " + reason); + }); + }); + // updateProxySettings + fin.desktop.System.updateProxySettings("type", "proxyAddress", 8080, () => { + console.log('success'); + }, err => { + console.log(err); + }); +} + +function test_system_clipboard() { + // availableFormats + fin.desktop.System.Clipboard.availableFormats(null, formats => { + formats.forEach(format => console.log(`The format ${format} is available to read`)); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readHtml + fin.desktop.System.Clipboard.readHtml(null, html => { + console.log(`This is the html from the clipboard: ${html}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readRtf + fin.desktop.System.Clipboard.readRtf(null, rtf => { + console.log(`This is the rtf from the clipboard: ${rtf}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // readText + fin.desktop.System.Clipboard.readText(null, text => { + console.log(`This is the text from the clipboard: ${text}`); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // write + fin.desktop.System.Clipboard.write({ + text: 'Hello Text!', + html: '

Hello Html

', + rtf: 'Hello Rtf' + }, null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeHtml + fin.desktop.System.Clipboard.writeHtml('

Hello World

', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeRtf + fin.desktop.System.Clipboard.writeRtf('Hello World!', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); + // writeText + fin.desktop.System.Clipboard.writeText('Hello World', null, () => { + console.log('Success!!'); + }, (reason, err) => { + console.log(`Error while reading the clipboard Message: ${err.message}, Stack: ${err.stack}`); + }); +} + +function test_window() { + let finWindow: fin.OpenFinWindow; + // constructor + finWindow = new fin.desktop.Window({ + name: "childWindow", + url: "child.html", + defaultWidth: 320, + defaultHeight: 320, + defaultTop: 10, + defaultLeft: 300, + frame: false, + resizable: false, + state: "normal" + }, () => { + const _win = finWindow.getNativeWindow(); + _win.addEventListener("DOMContentLoaded", () => { finWindow.show(); }); + }, error => { + console.log("Error creating window:", error); + }); + // getCurrent + finWindow = fin.desktop.Window.getCurrent(); + // getNativeWindow + let nativeWindow: Window; + nativeWindow = finWindow.getNativeWindow(); + // getParentApplication + let parentApp: fin.OpenFinApplication; + parentApp = finWindow.getParentApplication(); + // getParentWindow + let parentFinWindow: fin.OpenFinWindow; + parentFinWindow = finWindow.getParentWindow(); + // wrap + finWindow = fin.desktop.Window.wrap("uuid", "name"); + // addEventListener + finWindow.addEventListener("bounds-changed", event => { + console.log("The window has been moved or resized"); + }, () => { + console.log("The registration was successful"); + }, reason => { + console.log("failure:" + reason); + }); + // animate + finWindow.animate({ + opacity: { + opacity: 0.15, + duration: 1000 + }, + position: { + left: 10, + top: 10, + duration: 3000 + } + }, { + interrupt: false + }, evt => { + // Callback will only fire after both "opacity" and "position" have finished animating. + }); + // authenticate + finWindow.addEventListener('auth-requested', evt => { + finWindow.authenticate('userName', 'P@assw0rd', () => { }, (reason, err) => { + console.log("failure:", err); + }); + }); + // blur + finWindow.blur(); + // bringToFront + finWindow.bringToFront(); + // close + finWindow.close(); + // disableFrame + finWindow.disableFrame(); + // enableFrame + finWindow.enableFrame(); + // flash + finWindow.flash(); + // focus + finWindow.focus(); + // getBounds + finWindow.getBounds(bounds => { + console.log(`top: ${bounds.top} left: ${bounds.left} height: ${bounds.height} width: ${bounds.width}`); + }); + // getOptions + finWindow.getOptions(options => { + console.log(options); + }); + // getSnapshot + finWindow.getSnapshot(base64Snapshot => { + console.log("data:image/png;base64," + base64Snapshot); + }); + // getState + finWindow.getState(state => { + console.log("state: " + state); + }); + // getZoomLevel + finWindow.getZoomLevel(level => { + console.log("zoom level: " + level); + }, error => { + console.log('error:', error); + }); + // hide + finWindow.hide(); + // isShowing + finWindow.isShowing(showing => { + console.log("the window is " + (showing ? "showing" : "hidden")); + }); + // joinGroup + let secondWindow = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "secondWindow", + autoShow: true + }, () => { + // When mainWindow moves or is moved, secondWindow moves by the same amount + secondWindow.joinGroup(finWindow); + }); + // leaveGroup + secondWindow = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "secondWindow", + autoShow: true + }, () => { + // When finWindow moves or is moved, secondWindow moves by the same amount + secondWindow.joinGroup(finWindow, () => { + // once we are in the group, lets leave it. + secondWindow.leaveGroup(); + }); + }); + // maximize + finWindow.maximize(); + // mergeGroups + { + const finWindowOne = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowOne", + autoShow: true + }); + const finWindowTwo = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowTwo", + autoShow: true + }); + const finWindowThree = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowThree", + autoShow: true + }); + const finWindowFour = new fin.desktop.Window({ + url: "http://www.openfin.co", + name: "finWindowFour", + autoShow: true + }); + // When finWindowOne moves or is moved, finWindowTwo moves by the same amount + finWindowOne.joinGroup(finWindowTwo); + // When finWindowThree moves or is moved, finWindowFour moves by the same amount + finWindowThree.joinGroup(finWindowFour); + // finWindowOne, finWindowTwo, finWindowThree, and finWindowFour now move together in the same group + finWindowOne.mergeGroups(finWindowThree); + } + // minimize + finWindow.minimize(); + // moveBy + finWindow.moveBy(10, 10); + // moveTo + finWindow.moveTo(100, 200); + // removeEventListener + finWindow.removeEventListener("bounds-changed", event => { + console.log(event); + }); + // resizeBy + finWindow.resizeBy(10, 10, "top-right"); + // resizeTo + finWindow.resizeTo(10, 10, "top-right"); + // restore + finWindow.restore(); + // setAsForeground + finWindow.setAsForeground(); + // setBounds + finWindow.setBounds(100, 200, 400, 400); + // setZoomLevel + finWindow.setZoomLevel(10); + // show + finWindow.show(); + // showAt + finWindow.showAt(10, 10, false); + // stopFlashing + finWindow.stopFlashing(); + // updateOptions + finWindow.updateOptions({ + frame: false, + maxWidth: 500 + }); +} + +function test_frame() { + // wrap + const frame = fin.desktop.Frame.wrap('uuid', 'name'); + // getCurrent + const currentFrame = fin.desktop.Frame.getCurrent(); + // addEventlistener + frame.addEventListener('event', () => console.log('on event'), () => console.log('success'), err => console.error(err)); + // removeEventListener + frame.removeEventListener('event', () => console.log('on event'), () => console.log('success'), err => console.error(err)); + // getInfo + frame.getInfo(info => { + console.log(info.uuid, info.name, info.entityType, info.parent.uuid, info.parent.name); + }, err => console.error(err)); + // getParentWindow + frame.getParentWindow(parent => { + console.log(parent.uuid, parent.name, parent.entityType, parent.parent.uuid, parent.parent.name); + }, err => console.error(err)); +} diff --git a/types/openfin/v34/tsconfig.json b/types/openfin/v34/tsconfig.json new file mode 100644 index 0000000000..2a2c9d108b --- /dev/null +++ b/types/openfin/v34/tsconfig.json @@ -0,0 +1,81 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "openfin-tests.ts", + "_v2/api/application/application.d.ts", + "_v2/api/base.d.ts", + "_v2/api/clipboard/clipboard.d.ts", + "_v2/api/clipboard/write-request.d.ts", + "_v2/api/external-application/external-application.d.ts", + "_v2/api/fin.d.ts", + "_v2/api/frame/frame.d.ts", + "_v2/api/global-hotkey/index.d.ts", + "_v2/api/interappbus/channel/channel.d.ts", + "_v2/api/interappbus/channel/client.d.ts", + "_v2/api/interappbus/channel/index.d.ts", + "_v2/api/interappbus/channel/provider.d.ts", + "_v2/api/interappbus/interappbus.d.ts", + "_v2/api/notification/notification.d.ts", + "_v2/api/system/application.d.ts", + "_v2/api/system/clearCacheOption.d.ts", + "_v2/api/system/cookie.d.ts", + "_v2/api/system/crashReporterOption.d.ts", + "_v2/api/system/download-asset.d.ts", + "_v2/api/system/download-preload.d.ts", + "_v2/api/system/entity.d.ts", + "_v2/api/system/external-process.d.ts", + "_v2/api/system/host-specs.d.ts", + "_v2/api/system/log.d.ts", + "_v2/api/system/monitor.d.ts", + "_v2/api/system/point.d.ts", + "_v2/api/system/process.d.ts", + "_v2/api/system/proxy.d.ts", + "_v2/api/system/registry-info.d.ts", + "_v2/api/system/runtime-info.d.ts", + "_v2/api/system/rvm.d.ts", + "_v2/api/system/system.d.ts", + "_v2/api/system/window.d.ts", + "_v2/api/window/bounds-changed.d.ts", + "_v2/api/window/bounds.d.ts", + "_v2/api/window/transition.d.ts", + "_v2/api/window/window.d.ts", + "_v2/environment/environment.d.ts", + "_v2/environment/node-env.d.ts", + "_v2/environment/openfin-env.d.ts", + "_v2/environment/openfin-renderer-api.d.ts", + "_v2/identity.d.ts", + "_v2/launcher/launcher.d.ts", + "_v2/launcher/nix-launch.d.ts", + "_v2/launcher/util.d.ts", + "_v2/launcher/win-launch.d.ts", + "_v2/main.d.ts", + "_v2/of-main.d.ts", + "_v2/transport/elipc.d.ts", + "_v2/transport/port-discovery.d.ts", + "_v2/transport/transport-errors.d.ts", + "_v2/transport/transport.d.ts", + "_v2/transport/websocket.d.ts", + "_v2/transport/wire.d.ts", + "_v2/util/normalize-config.d.ts", + "_v2/util/promises.d.ts", + "_v2/util/ref-counter.d.ts" + ] +} diff --git a/types/openfin/v34/tslint.json b/types/openfin/v34/tslint.json new file mode 100644 index 0000000000..f95a4974aa --- /dev/null +++ b/types/openfin/v34/tslint.json @@ -0,0 +1,18 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "max-line-length": false, + "no-redundant-jsdoc-2": false, + "jsdoc-format": false, + "no-var-keyword": false, + "whitespace": false, + "semicolon": false, + "strict-export-declare-modifiers": false, + "array-type": false, + "unified-signatures": false, + "void-return": false, + "ban-types": false, + "callable-types": false, + "no-const-enum": false + } +} From 6b2775d9b4606067ea03bdfa553a4414edd220e9 Mon Sep 17 00:00:00 2001 From: Chris Yungmann Date: Fri, 26 Oct 2018 12:11:17 -0500 Subject: [PATCH 0098/1121] [jasmine] make SpyObjMethodNames more strongly-typed When a generic type argument is provided, require the method names array to only include keys of the generic type argument and for the object syntax, additionally require that the setup returned type matches the return type of the method. Requires TS 2.8 for conditional types. --- types/angular-wizard/index.d.ts | 2 +- types/frisby/index.d.ts | 2 +- types/frisby/v0/index.d.ts | 2 +- types/gulp-jasmine/index.d.ts | 2 +- types/jasmine-ajax/index.d.ts | 2 +- types/jasmine-data_driven_tests/index.d.ts | 2 +- types/jasmine-es6-promise-matchers/index.d.ts | 2 +- types/jasmine-fixture/index.d.ts | 2 +- types/jasmine-jquery/index.d.ts | 2 +- types/jasmine-matchers/index.d.ts | 2 +- types/jasmine-node/index.d.ts | 2 +- types/jasmine-promise-matchers/index.d.ts | 2 +- types/jasmine/index.d.ts | 12 +++++++++--- types/jasmine_dom_matchers/index.d.ts | 2 +- types/jasminewd2/index.d.ts | 2 +- types/karma-jasmine/index.d.ts | 2 +- types/protractor-helpers/index.d.ts | 2 +- types/saywhen/index.d.ts | 2 +- 18 files changed, 26 insertions(+), 20 deletions(-) diff --git a/types/angular-wizard/index.d.ts b/types/angular-wizard/index.d.ts index 33fa8b2b0a..fa14a2f2f7 100644 --- a/types/angular-wizard/index.d.ts +++ b/types/angular-wizard/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mgonto/angular-wizard // Definitions by: Marko Jurisic , Ronald Wildenberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import * as angular from 'angular'; diff --git a/types/frisby/index.d.ts b/types/frisby/index.d.ts index 9057edae6d..1bcd6fdabb 100644 --- a/types/frisby/index.d.ts +++ b/types/frisby/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Christopher E. Woodland // Johnny Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/frisby/v0/index.d.ts b/types/frisby/v0/index.d.ts index 37ccb7c15f..bb41e93321 100644 --- a/types/frisby/v0/index.d.ts +++ b/types/frisby/v0/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/vlucas/frisby // Definitions by: Johnny Li // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/gulp-jasmine/index.d.ts b/types/gulp-jasmine/index.d.ts index d36896d855..e1693e38cd 100644 --- a/types/gulp-jasmine/index.d.ts +++ b/types/gulp-jasmine/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/sindresorhus/gulp-jasmine#readme // Definitions by: Andrey Lalev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// /// diff --git a/types/jasmine-ajax/index.d.ts b/types/jasmine-ajax/index.d.ts index 2e111a19f3..ad95004612 100644 --- a/types/jasmine-ajax/index.d.ts +++ b/types/jasmine-ajax/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jasmine/jasmine-ajax // Definitions by: Louis Grignon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 interface JasmineAjaxResponse { status?: number; diff --git a/types/jasmine-data_driven_tests/index.d.ts b/types/jasmine-data_driven_tests/index.d.ts index 54a7ea0441..6e6a070eaa 100644 --- a/types/jasmine-data_driven_tests/index.d.ts +++ b/types/jasmine-data_driven_tests/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gburghardt/jasmine-data_driven_tests // Definitions by: Anthony MacKinnon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 declare var all: JasmineDataDrivenTest; declare var xall: JasmineDataDrivenTest; diff --git a/types/jasmine-es6-promise-matchers/index.d.ts b/types/jasmine-es6-promise-matchers/index.d.ts index e80b9241c7..0a1c5360be 100644 --- a/types/jasmine-es6-promise-matchers/index.d.ts +++ b/types/jasmine-es6-promise-matchers/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/bvaughn/jasmine-es6-promise-matchers // Definitions by: Stephen Lautier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/jasmine-fixture/index.d.ts b/types/jasmine-fixture/index.d.ts index 82449ffc01..cb68513a79 100644 --- a/types/jasmine-fixture/index.d.ts +++ b/types/jasmine-fixture/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/searls/jasmine-fixture // Definitions by: Craig Brett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/jasmine-jquery/index.d.ts b/types/jasmine-jquery/index.d.ts index 0dc023f33a..1675992a7b 100644 --- a/types/jasmine-jquery/index.d.ts +++ b/types/jasmine-jquery/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/velesin/jasmine-jquery // Definitions by: Gregor Stamac // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// /// diff --git a/types/jasmine-matchers/index.d.ts b/types/jasmine-matchers/index.d.ts index e5167e2084..7284ffce49 100644 --- a/types/jasmine-matchers/index.d.ts +++ b/types/jasmine-matchers/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/uxebu/jasmine-matchers // Definitions by: Bart van der Schoor // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /* Typings 2013 Bart van der Schoor diff --git a/types/jasmine-node/index.d.ts b/types/jasmine-node/index.d.ts index dcb55bcd2d..3270b356bd 100644 --- a/types/jasmine-node/index.d.ts +++ b/types/jasmine-node/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mhevery/jasmine-node // Definitions by: Sven Reglitzki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/jasmine-promise-matchers/index.d.ts b/types/jasmine-promise-matchers/index.d.ts index e2b3c0116e..3c05b5304e 100644 --- a/types/jasmine-promise-matchers/index.d.ts +++ b/types/jasmine-promise-matchers/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/bvaughn/jasmine-promise-matchers // Definitions by: Matthew Hill // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/jasmine/index.d.ts b/types/jasmine/index.d.ts index 254714ff94..8e8ca9489f 100644 --- a/types/jasmine/index.d.ts +++ b/types/jasmine/index.d.ts @@ -1,8 +1,14 @@ // Type definitions for Jasmine 2.8.0 // Project: http://jasmine.github.io/ -// Definitions by: Boris Yankov , Theodore Brown , David Pärsson , Gabe Moothart , Lukas Zech , Boris Breuer +// Definitions by: Boris Yankov +// Theodore Brown +// David Pärsson +// Gabe Moothart +// Lukas Zech +// Boris Breuer +// Chris Yungmann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 // For ddescribe / iit use : https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts /** @@ -129,7 +135,7 @@ declare function waits(timeout?: number): void; declare namespace jasmine { type Expected = T | ObjectContaining | Any | Spy; - type SpyObjMethodNames = string[] | {[methodName: string]: any} | Array; + type SpyObjMethodNames = T extends undefined ? (ReadonlyArray | {[methodName: string]: any}) : (ReadonlyArray | {[P in keyof T]?: ReturnType any ? T[P] : any>}); var clock: () => Clock; diff --git a/types/jasmine_dom_matchers/index.d.ts b/types/jasmine_dom_matchers/index.d.ts index 5ab86cc799..b3a625f08c 100644 --- a/types/jasmine_dom_matchers/index.d.ts +++ b/types/jasmine_dom_matchers/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/charleshansen/jasmine_dom_matchers // Definitions by: Yaroslav Admin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/jasminewd2/index.d.ts b/types/jasminewd2/index.d.ts index efabeaafe0..7e75d87991 100644 --- a/types/jasminewd2/index.d.ts +++ b/types/jasminewd2/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Sammy Jelin // George Kalpakas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/karma-jasmine/index.d.ts b/types/karma-jasmine/index.d.ts index ae929c6af3..73ca7a480e 100644 --- a/types/karma-jasmine/index.d.ts +++ b/types/karma-jasmine/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/karma-runner/karma-jasmine // Definitions by: Michel Salib // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// diff --git a/types/protractor-helpers/index.d.ts b/types/protractor-helpers/index.d.ts index bc52455d6e..686c2442be 100644 --- a/types/protractor-helpers/index.d.ts +++ b/types/protractor-helpers/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wix/protractor-helpers // Definitions by: John Cant // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import * as webdriver from "selenium-webdriver"; diff --git a/types/saywhen/index.d.ts b/types/saywhen/index.d.ts index 1c78d4a78e..8c2310312d 100644 --- a/types/saywhen/index.d.ts +++ b/types/saywhen/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/pushtechnology/saywhen // Definitions by: Sean Sobey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 /// From be48833bf936a77fb956b345046b060a2dbd5bff Mon Sep 17 00:00:00 2001 From: licui Date: Fri, 26 Oct 2018 15:40:51 -0400 Subject: [PATCH 0099/1121] update v2 to latest --- .../_v2/api/application/application.d.ts | 66 ++++--- types/openfin/_v2/api/base.d.ts | 45 ++--- types/openfin/_v2/api/events/application.d.ts | 56 ++++++ types/openfin/_v2/api/events/base.d.ts | 18 ++ types/openfin/_v2/api/events/channel.d.ts | 10 + types/openfin/_v2/api/events/emitterMap.d.ts | 15 ++ .../_v2/api/events/eventAggregator.d.ts | 5 + .../_v2/api/events/externalApplication.d.ts | 5 + types/openfin/_v2/api/events/frame.d.ts | 9 + .../openfin/_v2/api/events/globalHotkey.d.ts | 11 ++ .../openfin/_v2/api/events/notifications.d.ts | 8 + types/openfin/_v2/api/events/system.d.ts | 22 +++ types/openfin/_v2/api/events/window.d.ts | 176 ++++++++++++++++++ .../external-application.d.ts | 26 ++- types/openfin/_v2/api/frame/frame.d.ts | 38 +++- .../openfin/_v2/api/global-hotkey/index.d.ts | 7 +- .../_v2/api/interappbus/channel/index.d.ts | 21 +-- .../_v2/api/interappbus/channel/provider.d.ts | 10 +- .../_v2/api/notification/notification.d.ts | 5 +- types/openfin/_v2/api/system/system.d.ts | 16 +- types/openfin/_v2/api/window/window.d.ts | 75 +++++--- types/openfin/_v2/transport/transport.d.ts | 19 +- types/openfin/index.d.ts | 5 +- 23 files changed, 545 insertions(+), 123 deletions(-) create mode 100644 types/openfin/_v2/api/events/application.d.ts create mode 100644 types/openfin/_v2/api/events/base.d.ts create mode 100644 types/openfin/_v2/api/events/channel.d.ts create mode 100644 types/openfin/_v2/api/events/emitterMap.d.ts create mode 100644 types/openfin/_v2/api/events/eventAggregator.d.ts create mode 100644 types/openfin/_v2/api/events/externalApplication.d.ts create mode 100644 types/openfin/_v2/api/events/frame.d.ts create mode 100644 types/openfin/_v2/api/events/globalHotkey.d.ts create mode 100644 types/openfin/_v2/api/events/notifications.d.ts create mode 100644 types/openfin/_v2/api/events/system.d.ts create mode 100644 types/openfin/_v2/api/events/window.d.ts diff --git a/types/openfin/_v2/api/application/application.d.ts b/types/openfin/_v2/api/application/application.d.ts index 616501834d..b5797aa7ad 100644 --- a/types/openfin/_v2/api/application/application.d.ts +++ b/types/openfin/_v2/api/application/application.d.ts @@ -1,10 +1,11 @@ -import { EmitterBase, Base, Reply, RuntimeEvent } from '../base'; +import { EmitterBase, Base, Reply } from '../base'; import { Identity } from '../../identity'; import { _Window } from '../window/window'; import { Point } from '../system/point'; import { MonitorInfo } from '../system/monitor'; import Transport from '../../transport/transport'; import Bounds from '../window/bounds'; +import { ApplicationEvents } from '../events/application'; export interface TrayIconClickReply extends Point, Reply<'application', 'tray-icon-clicked'> { button: number; monitorInfo: MonitorInfo; @@ -32,32 +33,54 @@ export interface TrayInfo { x: number; y: number; } +/** + * @lends Application + */ export default class ApplicationModule extends Base { /** - * Returns an Application object that represents an existing application. - * @param { Identity } indentity + * Asynchronously returns an Application object that represents an existing application. + * @param { Identity } identity * @return {Promise.} * @tutorial Application.wrap + * @static */ wrap(identity: Identity): Promise; + /** + * Synchronously returns an Application object that represents an existing application. + * @param { Identity } identity + * @return {Application} + * @tutorial Application.wrapSync + * @static + */ + wrapSync(identity: Identity): Application; /** * Creates a new Application. * @param {*} appOptions * @return {Promise.} * @tutorial Application.create + * @static */ create(appOptions: any): Promise; /** - * Returns an Application object that represents the current application + * Asynchronously returns an Application object that represents the current application * @return {Promise.} * @tutorial Application.getCurrent + * @static */ getCurrent(): Promise; + /** + * Synchronously returns an Application object that represents the current application + * @return {Application} + * @tutorial Application.getCurrentSync + * @static + */ + getCurrentSync(): Application; /** * Retrieves application's manifest and returns a wrapped application. * @param {string} manifestUrl - The URL of app's manifest. * @return {Promise.} * @tutorial Application.createFromManifest + * @static */ createFromManifest(manifestUrl: string): Promise; } @@ -66,12 +89,11 @@ export default class ApplicationModule extends Base { * execute, show/close an application as well as listen to application events. * @class */ -export declare class Application extends EmitterBase { +export declare class Application extends EmitterBase { identity: Identity; _manifestUrl?: string; private window; constructor(wire: Transport, identity: Identity); - protected runtimeEventComparator: (listener: RuntimeEvent) => boolean; private windowListFromIdentityList; /** * Determines if the application is currently running. @@ -120,6 +142,12 @@ export declare class Application extends EmitterBase { * @tutorial Application.getShortcuts */ getShortcuts(): Promise; + /** + * Returns the current zoom level of the application. + * @return {Promise.} + * @tutorial Application.getZoomLevel + */ + getZoomLevel(): Promise; /** * Returns an instance of the main Window of the application * @return {Promise.<_Window>} @@ -175,6 +203,14 @@ export declare class Application extends EmitterBase { * @tutorial Application.setShortcuts */ setShortcuts(config: ConfigInterface): Promise; + /** + * Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20% + * larger or smaller to default limits of 300% and 50% of original size, respectively. + * @param { number } level The zoom level + * @return {Promise.} + * @tutorial Application.setZoomLevel + */ + setZoomLevel(level: number): Promise; /** * @summary Retrieves information about the system tray. * @desc The only information currently returned is the position and dimensions. @@ -203,21 +239,3 @@ export declare class Application extends EmitterBase { */ getInfo(): Promise; } -export interface Application { - on(type: 'closed', listener: (data: Reply<'application', 'closed'>) => void): Promise; - on(type: 'initialized', listener: (data: Reply<'application', 'initialized'>) => void): Promise; - on(type: 'connected', listener: (data: Reply<'application', 'connected'>) => void): Promise; - on(type: 'crashed', listener: (data: Reply<'application', 'crashed'>) => void): Promise; - on(type: 'error', listener: (data: Reply<'application', 'error'>) => void): Promise; - on(type: 'not-responding', listener: (data: Reply<'application', 'not-responding'>) => void): Promise; - on(type: 'out-of-memory', listener: (data: Reply<'application', 'out-of-memory'>) => void): Promise; - on(type: 'responding', listener: (data: Reply<'application', 'responding'>) => void): Promise; - on(type: 'started', listener: (data: Reply<'application', 'started'>) => void): Promise; - on(type: 'run-requested', listener: (data: Reply<'application', 'run-requested'>) => void): Promise; - on(type: 'window-navigation-rejected', listener: (data: NavigationRejectedReply) => void): Promise; - on(type: 'window-created', listener: (data: Reply<'application', 'window-created'>) => void): Promise; - on(type: 'window-closed', listener: (data: Reply<'application', 'window-closed'>) => void): Promise; - on(type: 'tray-icon-clicked', listener: (data: TrayIconClickReply) => void): Promise; - on(type: 'removeListener', listener: (eventType: string) => void): Promise; - on(type: 'newListener', listener: (eventType: string) => void): Promise; -} diff --git a/types/openfin/_v2/api/base.d.ts b/types/openfin/_v2/api/base.d.ts index 1f17e1f24f..5cbb8658a7 100644 --- a/types/openfin/_v2/api/base.d.ts +++ b/types/openfin/_v2/api/base.d.ts @@ -1,10 +1,11 @@ /// -import Transport, { Message } from '../transport/transport'; +import Transport from '../transport/transport'; import { Identity } from '../identity'; import { EventEmitter } from 'events'; -export interface RuntimeEvent extends Identity { - topic: string; - type: string | symbol; +import { EmitterAccessor } from './events/emitterMap'; +import { BaseEventMap } from './events/base'; +interface SubOptions { + timestamp?: number; } export declare class Base { wire: Transport; @@ -14,26 +15,27 @@ export declare class Base { readonly me: Identity; protected isNodeEnvironment: () => boolean; protected isOpenFinEnvironment: () => boolean; - protected runtimeEventComparator: (listener: RuntimeEvent) => boolean; } -export declare class EmitterBase extends Base { +export declare class EmitterBase extends Base { + private emitterAccessor; protected identity: Identity; - protected emitter: EventEmitter; - listeners: (event: string | symbol) => Function[]; + constructor(wire: Transport, emitterAccessor: EmitterAccessor); + eventNames: () => (string | symbol)[]; + emit: >(eventName: E, payload: E extends Extract ? EventTypes[E] : any, ...args: any[]) => boolean; + private hasEmitter; + private getEmitter; + listeners: (type: string | symbol) => Function[]; listenerCount: (type: string | symbol) => number; - constructor(wire: Transport); - emit: (eventName: string | symbol, ...args: any[]) => void; - protected onmessage: (message: Message) => boolean; - protected registerEventListener: (listener: RuntimeEvent) => Promise>; - protected deregisterEventListener: (listener: RuntimeEvent) => Promise>; - on(eventType: string, listener: (...args: any[]) => void): Promise; - addListener: (eventType: string, listener: (...args: any[]) => void) => Promise; - once(eventType: string, listener: (...args: any[]) => void): Promise; - prependListener(eventType: string, listener: (...args: any[]) => void): Promise; - prependOnceListener(eventType: string, listener: (...args: any[]) => void): Promise; - removeListener(eventType: string, listener: (...args: any[]) => void): Promise; - protected deregisterAllListeners: (eventType: string | symbol) => Promise>; - removeAllListeners(eventType?: string): Promise; + protected registerEventListener: (eventType: string | symbol | Extract, options?: SubOptions) => Promise; + protected deregisterEventListener: (eventType: string | symbol | Extract, options?: SubOptions) => Promise; + on | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: SubOptions): Promise; + addListener: >(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: SubOptions) => Promise; + once | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: SubOptions): Promise; + prependListener | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: SubOptions): Promise; + prependOnceListener | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: SubOptions): Promise; + removeListener | string | symbol>(eventType: E, listener: (payload: E extends keyof EventTypes ? EventTypes[E] : any, ...args: any[]) => void, options?: SubOptions): Promise; + protected deregisterAllListeners: (eventType: string | symbol | Extract) => Promise; + removeAllListeners(eventType?: Extract | string | symbol): Promise; } export declare class Reply implements Identity { topic: TOPIC; @@ -41,3 +43,4 @@ export declare class Reply imp uuid: string; name?: string; } +export {}; diff --git a/types/openfin/_v2/api/events/application.d.ts b/types/openfin/_v2/api/events/application.d.ts new file mode 100644 index 0000000000..444d358cbd --- /dev/null +++ b/types/openfin/_v2/api/events/application.d.ts @@ -0,0 +1,56 @@ +import { WindowEvent, BaseEventMap, ApplicationEvent } from './base'; +import { WindowAlertRequestedEvent, WindowAuthRequestedEvent, WindowEndLoadEvent, PropagatedWindowEvents } from './window'; +export interface CrashedEvent { + reason: 'normal-termination' | 'abnormal-termination' | 'killed' | 'crashed' | 'still-running' | 'launch-failed' | 'out-of-memory'; +} +export interface RunRequestedEvent extends ApplicationEvent { + userAppConfigArgs: any; +} +export interface TrayIconClicked extends ApplicationEvent { + button: 0 | 1 | 2; + x: number; + y: number; + monitorInfo: any; +} +export interface ApplicationEventMapping extends BaseEventMap { + 'closed': ApplicationEvent; + 'connected': ApplicationEvent; + 'crashed': CrashedEvent & ApplicationEvent; + 'initialized': ApplicationEvent; + 'manifest-changed': ApplicationEvent; + 'not-responding': ApplicationEvent; + 'responding': ApplicationEvent; + 'run-requested': RunRequestedEvent; + 'started': ApplicationEvent; + 'tray-icon-clicked': TrayIconClicked; + 'window-alert-requested': WindowAlertRequestedEvent; + 'window-auth-requested': WindowAuthRequestedEvent; + 'window-created': WindowEvent; + 'window-end-load': WindowEndLoadEvent; + 'window-not-responding': WindowEvent; + 'window-responding': WindowEvent; + 'window-show-requested': WindowEvent; + 'window-start-load': WindowEvent; +} +export interface PropagatedApplicationEventMapping { + 'application-closed': ApplicationEvent; + 'application-connected': ApplicationEvent; + 'application-crashed': CrashedEvent & ApplicationEvent; + 'application-initialized': ApplicationEvent; + 'application-manifest-changed': ApplicationEvent; + 'application-not-responding': ApplicationEvent; + 'application-responding': ApplicationEvent; + 'application-started': ApplicationEvent; + 'application-tray-icon-clicked': TrayIconClicked; + 'window-created': WindowEvent; + 'window-end-load': WindowEndLoadEvent; + 'window-not-responding': WindowEvent; + 'window-responding': WindowEvent; + 'window-start-load': WindowEvent; +} +export declare type ApplicationEvents = PropagatedWindowEvents<'application'> & { + [Type in keyof ApplicationEventMapping]: ApplicationEventMapping<'application', Type>[Type]; +}; +export declare type PropagatedApplicationEvents = { + [Type in keyof PropagatedApplicationEventMapping]: PropagatedApplicationEventMapping[Type]; +}; diff --git a/types/openfin/_v2/api/events/base.d.ts b/types/openfin/_v2/api/events/base.d.ts new file mode 100644 index 0000000000..700f82679b --- /dev/null +++ b/types/openfin/_v2/api/events/base.d.ts @@ -0,0 +1,18 @@ +import { FrameEvent } from './frame'; +export declare type RuntimeEvent = Topic extends 'window' ? WindowEvent : Topic extends 'frame' ? FrameEvent : Topic extends 'application' ? ApplicationEvent : BaseEvent; +export interface BaseEvent { + topic: Topic; + type: Type; +} +export interface ApplicationEvent extends BaseEvent { + uuid: string; +} +export interface WindowEvent extends ApplicationEvent { + name: string; +} +export declare function getTopic(e: RuntimeEvent): string; +export interface BaseEventMap { + [name: string]: any; + 'newListener': string; + 'listenerRemoved': string; +} diff --git a/types/openfin/_v2/api/events/channel.d.ts b/types/openfin/_v2/api/events/channel.d.ts new file mode 100644 index 0000000000..3c448071cb --- /dev/null +++ b/types/openfin/_v2/api/events/channel.d.ts @@ -0,0 +1,10 @@ +import { BaseEventMap, ApplicationEvent } from './base'; +export interface ChannelEvent extends ApplicationEvent<'channel', Type> { + channelName: string; + channelId: string; + name?: string; +} +export interface ChannelEvents extends BaseEventMap { + 'connected': ChannelEvent<'connected'>; + 'disconnected': ChannelEvent<'disconnected'>; +} diff --git a/types/openfin/_v2/api/events/emitterMap.d.ts b/types/openfin/_v2/api/events/emitterMap.d.ts new file mode 100644 index 0000000000..aa3fb498e8 --- /dev/null +++ b/types/openfin/_v2/api/events/emitterMap.d.ts @@ -0,0 +1,15 @@ +/// +import { EventEmitter } from 'events'; +export declare class EmitterMap { + private storage; + constructor(); + private hashKeys; + get(keys: EmitterAccessor): EventEmitter; + has(keys: EmitterAccessor): boolean; + delete(keys: EmitterAccessor): boolean; +} +export declare type SystemEmitterAccessor = ['system']; +export declare type ApplicationEmitterAccessor = ['application', string]; +export declare type WindowEmitterAccessor = ['window', string, string]; +export declare type HotkeyEmitterAccessor = ['global-hotkey']; +export declare type EmitterAccessor = SystemEmitterAccessor | ApplicationEmitterAccessor | WindowEmitterAccessor | HotkeyEmitterAccessor | string[]; diff --git a/types/openfin/_v2/api/events/eventAggregator.d.ts b/types/openfin/_v2/api/events/eventAggregator.d.ts new file mode 100644 index 0000000000..ac7b7ca1b2 --- /dev/null +++ b/types/openfin/_v2/api/events/eventAggregator.d.ts @@ -0,0 +1,5 @@ +import { Message } from '../../transport/transport'; +import { EmitterMap } from './emitterMap'; +export declare class EventAggregator extends EmitterMap { + dispatchEvent: (message: Message) => boolean; +} diff --git a/types/openfin/_v2/api/events/externalApplication.d.ts b/types/openfin/_v2/api/events/externalApplication.d.ts new file mode 100644 index 0000000000..f7cd85f45d --- /dev/null +++ b/types/openfin/_v2/api/events/externalApplication.d.ts @@ -0,0 +1,5 @@ +import { RuntimeEvent, BaseEventMap } from './base'; +export interface ExternalApplicationEvents extends BaseEventMap { + connected: RuntimeEvent<'externalapplication', 'connected'>; + disconnected: RuntimeEvent<'externalapplication', 'disconnected'>; +} diff --git a/types/openfin/_v2/api/events/frame.d.ts b/types/openfin/_v2/api/events/frame.d.ts new file mode 100644 index 0000000000..c31933e557 --- /dev/null +++ b/types/openfin/_v2/api/events/frame.d.ts @@ -0,0 +1,9 @@ +import { BaseEventMap, WindowEvent } from './base'; +export interface FrameEvent extends WindowEvent<'frame', Type> { + entityType: 'iframe'; + frameName: string; +} +export interface FrameEvents extends BaseEventMap { + connected: FrameEvent<'connected'>; + disconnected: FrameEvent<'disconnected'>; +} diff --git a/types/openfin/_v2/api/events/globalHotkey.d.ts b/types/openfin/_v2/api/events/globalHotkey.d.ts new file mode 100644 index 0000000000..561baba446 --- /dev/null +++ b/types/openfin/_v2/api/events/globalHotkey.d.ts @@ -0,0 +1,11 @@ +import { RuntimeEvent, BaseEventMap } from './base'; +import { Identity } from '../../identity'; +import { nonHotkeyEvents } from '../global-hotkey'; +export interface GlobalHotkeyEvent extends RuntimeEvent<'global-hotkey', Type> { + identity: Identity; + hotkey: string; +} +export interface GlobalHotkeyEvents extends BaseEventMap { + [nonHotkeyEvents.REGISTERED]: GlobalHotkeyEvent; + [nonHotkeyEvents.UNREGISTERED]: GlobalHotkeyEvent; +} diff --git a/types/openfin/_v2/api/events/notifications.d.ts b/types/openfin/_v2/api/events/notifications.d.ts new file mode 100644 index 0000000000..a269817222 --- /dev/null +++ b/types/openfin/_v2/api/events/notifications.d.ts @@ -0,0 +1,8 @@ +import { RuntimeEvent, BaseEventMap } from './base'; +export interface NotificationEvents extends BaseEventMap { + show: RuntimeEvent<'notification', 'show'>; + close: RuntimeEvent<'notification', 'close'>; + error: RuntimeEvent<'notification', 'error'>; + click: RuntimeEvent<'notification', 'click'>; + message: RuntimeEvent<'notification', 'message'>; +} diff --git a/types/openfin/_v2/api/events/system.d.ts b/types/openfin/_v2/api/events/system.d.ts new file mode 100644 index 0000000000..20285a8862 --- /dev/null +++ b/types/openfin/_v2/api/events/system.d.ts @@ -0,0 +1,22 @@ +import { BaseEvent, ApplicationEvent, BaseEventMap } from './base'; +import { MonitorInfo } from '../system/monitor'; +import { PropagatedWindowEvents } from './window'; +import { PropagatedApplicationEvents } from './application'; +export interface IdleEvent extends BaseEvent { + elapsedTime: number; + isIdle: boolean; +} +export declare type MonitorEvent = MonitorInfo & BaseEvent; +export interface SessionChangedEvent extends BaseEvent { + reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown'; +} +export interface SystemEventMapping extends BaseEventMap { + 'application-created': ApplicationEvent; + 'desktop-icon-clicked': ApplicationEvent; + 'idle-state-changed': IdleEvent; + 'monitor-info-changed': MonitorEvent; + 'session-changed': SessionChangedEvent; +} +export declare type SystemEvents = PropagatedWindowEvents<'system'> & PropagatedApplicationEvents<'system'> & { + [Type in keyof SystemEventMapping]: SystemEventMapping<'system', Type>[Type]; +}; diff --git a/types/openfin/_v2/api/events/window.d.ts b/types/openfin/_v2/api/events/window.d.ts new file mode 100644 index 0000000000..85d4d553f0 --- /dev/null +++ b/types/openfin/_v2/api/events/window.d.ts @@ -0,0 +1,176 @@ +import { CrashedEvent } from './application'; +import { WindowEvent, BaseEventMap } from './base'; +export declare type SpecificWindowEvent = WindowEvent<'window', Type>; +export interface WindowAlertRequestedEvent extends WindowEvent { + message: string; + url: string; +} +export interface WindowAuthRequestedEvent extends WindowEvent { + authInfo: { + host: string; + isProxy: boolean; + port: number; + realm: string; + scheme: string; + }; +} +export interface WindowEndLoadEvent extends WindowEvent { + documentName: string; + isMain: boolean; +} +export interface WindowNavigationRejectedEvent extends WindowEvent { + sourceName: string; + url: string; +} +export interface WindowReloadedEvent extends WindowEvent { + url: string; +} +export interface WindowExternalProcessExitedEvent extends WindowEvent { + processUuid: string; + exitCode: number; +} +export interface WindowExternalProcessStartedEvent extends WindowEvent { + processUuid: string; +} +export interface WindowHiddenEvent extends WindowEvent { + reason: 'closing' | 'hide' | 'hide-on-close'; +} +export interface PreloadScriptInfoRunning { + state: 'load-started' | // started loading preload script + 'load-failed' | // preload script failed to load + 'load-succeeded' | // preload script is loaded and ready to be eval'ed + 'failed' | // preload script failed to eval + 'succeeded'; +} +export interface PreloadScriptInfo { + state: 'load-failed' | // preload script failed to load + 'failed' | // preload script failed to eval + 'succeeded'; +} +export interface WindowPreloadScriptsStateChangeEvent extends WindowEvent { + preloadScripts: (PreloadScriptInfoRunning & any)[]; +} +export interface WindowPreloadScriptsStateChangedEvent extends WindowEvent { + preloadScripts: (PreloadScriptInfoRunning & any)[]; +} +export interface WindowPreloadScriptsStateChangedEvent extends WindowEvent { + preloadScripts: (PreloadScriptInfo & any)[]; +} +export interface WindowResourceLoadFailedEvent extends WindowEvent { + errorCode: number; + errorDescription: string; + validatedURL: string; + isMainFrame: boolean; +} +export interface WindowResourceResponseReceivedEvent extends WindowEvent { + status: boolean; + newUrl: string; + originalUrl: string; + httpResponseCode: number; + requestMethod: string; + referrer: string; + headers: any; + resourceType: 'mainFrame' | 'subFrame' | 'styleSheet' | 'script' | 'image' | 'object' | 'xhr' | 'other'; +} +export interface WindowBeginBoundsChangingEvent extends WindowEvent { + height: number; + left: number; + top: number; + width: number; + windowState: 'minimized' | 'normal' | 'maximized'; +} +export interface WindowBoundsChange extends WindowEvent { + changeType: 0 | 1 | 2; + deferred: boolean; + height: number; + left: number; + top: number; + width: number; +} +export interface WindowGroupChanged extends WindowEvent { + memberOf: 'source' | 'target' | 'nothing'; + reason: 'leave' | 'join' | 'merge' | 'disband'; + sourceGroup: { + appUuid: string; + windowName: string; + }[]; + sourceWindowAppUuid: string; + sourceWindowName: string; + targetGroup: { + appUuid: string; + windowName: string; + }[]; + targetWindowAppUuid: string; + targetWindowName: string; +} +export interface WindowEventMapping extends BaseEventMap { + 'auth-requested': WindowAuthRequestedEvent; + 'begin-user-bounds-changing': WindowBeginBoundsChangingEvent; + 'blurred': WindowEvent; + 'bounds-changed': WindowBoundsChange; + 'bounds-changing': WindowBoundsChange; + 'close-requested': WindowEvent; + 'closed': WindowEvent; + 'closing': WindowEvent; + 'crashed': CrashedEvent & WindowEvent; + 'disabled-frame-bounds-changed': WindowBoundsChange; + 'disabled-frame-bounds-changing': WindowBoundsChange; + 'embedded': WindowEvent; + 'end-user-bounds-changing': WindowBeginBoundsChangingEvent; + 'external-process-exited': WindowExternalProcessExitedEvent; + 'external-process-started': WindowExternalProcessStartedEvent; + 'focused': WindowEvent; + 'frame-disabled': WindowEvent; + 'frame-enabled': WindowEvent; + 'group-changed': WindowGroupChanged; + 'hidden': WindowHiddenEvent; + 'initialized': WindowEvent; + 'maximized': WindowEvent; + 'minimized': WindowEvent; + 'navigation-rejected': WindowNavigationRejectedEvent; + 'preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent; + 'preload-scripts-state-changing': WindowPreloadScriptsStateChangeEvent; + 'resource-load-failed': WindowResourceLoadFailedEvent; + 'resource-response-received': WindowResourceResponseReceivedEvent; + 'reloaded': WindowReloadedEvent; + 'restored': WindowEvent; + 'show-requested': WindowEvent; + 'shown': WindowEvent; +} +export interface PropagatedWindowEventMapping extends BaseEventMap { + 'window-begin-user-bounds-changing': WindowBeginBoundsChangingEvent; + 'window-blurred': WindowEvent; + 'window-bounds-changed': WindowBoundsChange; + 'window-bounds-changing': WindowBoundsChange; + 'window-closed': WindowEvent; + 'window-closing': WindowEvent; + 'window-crashed': CrashedEvent & WindowEvent; + 'window-disabled-frame-bounds-changed': WindowBoundsChange; + 'window-disabled-frame-bounds-changing': WindowBoundsChange; + 'window-embedded': WindowEvent; + 'window-end-user-bounds-changing': WindowBeginBoundsChangingEvent; + 'window-external-process-exited': WindowExternalProcessExitedEvent; + 'window-external-process-started': WindowExternalProcessStartedEvent; + 'window-focused': WindowEvent; + 'window-frame-disabled': WindowEvent; + 'window-frame-enabled': WindowEvent; + 'window-group-changed': WindowGroupChanged; + 'window-hidden': WindowHiddenEvent; + 'window-initialized': WindowEvent; + 'window-maximized': WindowEvent; + 'window-minimized': WindowEvent; + 'window-navigation-rejected': WindowNavigationRejectedEvent; + 'window-preload-scripts-state-changed': WindowPreloadScriptsStateChangeEvent; + 'window-preload-scripts-state-changing': WindowPreloadScriptsStateChangedEvent; + 'window-resource-load-failed': WindowResourceLoadFailedEvent; + 'window-resource-response-received': WindowResourceResponseReceivedEvent; + 'window-reloaded': WindowReloadedEvent; + 'window-restored': WindowEvent; + 'window-shown': WindowEvent; +} +export declare type WindowEvents = { + [Type in keyof WindowEventMapping]: WindowEventMapping<'window', Type>[Type]; +}; +export declare type PropagatedWindowEvents = { + [Type in keyof PropagatedWindowEventMapping]: PropagatedWindowEventMapping[Type]; +}; diff --git a/types/openfin/_v2/api/external-application/external-application.d.ts b/types/openfin/_v2/api/external-application/external-application.d.ts index 2d1f46e0f3..a4f44851e9 100644 --- a/types/openfin/_v2/api/external-application/external-application.d.ts +++ b/types/openfin/_v2/api/external-application/external-application.d.ts @@ -1,16 +1,30 @@ -import { Base, EmitterBase, Reply } from '../base'; +import { Base, EmitterBase } from '../base'; import { Identity } from '../../identity'; import Transport from '../../transport/transport'; +import { ExternalApplicationEvents } from '../events/externalApplication'; export interface ExternalApplicationInfo { parent: Identity; } +/** + * @lends ExternalApplication + */ export default class ExternalApplicationModule extends Base { /** - * Returns an External Application object that represents an existing external application. + * Asynchronously returns an External Application object that represents an existing external application. * @param {string} uuid The UUID of the external application to be wrapped * @return {Promise.} + * @tutorial ExternalApplication.wrap + * @static */ wrap(uuid: string): Promise; + /** + * Synchronously returns an External Application object that represents an existing external application. + * @param {string} uuid The UUID of the external application to be wrapped + * @return {ExternalApplication} + * @tutorial ExternalApplication.wrapSync + * @static + */ + wrapSync(uuid: string): ExternalApplication; } /** * @classdesc An ExternalApplication object representing an application. Allows @@ -18,7 +32,7 @@ export default class ExternalApplicationModule extends Base { * well as listen to application events. * @class */ -export declare class ExternalApplication extends EmitterBase { +export declare class ExternalApplication extends EmitterBase { identity: Identity; constructor(wire: Transport, identity: Identity); /** @@ -28,9 +42,3 @@ export declare class ExternalApplication extends EmitterBase { */ getInfo(): Promise; } -export interface ExternalApplication { - on(type: 'connected', listener: (data: Reply<'externalapplication', 'connected'>) => void): Promise; - on(type: 'disconnected', listener: (data: Reply<'externalapplication', 'disconnected'>) => void): Promise; - on(type: 'removeListener', listener: (eventType: string) => void): Promise; - on(type: 'newListener', listener: (eventType: string) => void): Promise; -} diff --git a/types/openfin/_v2/api/frame/frame.d.ts b/types/openfin/_v2/api/frame/frame.d.ts index 4a5ab971de..8795ae190b 100644 --- a/types/openfin/_v2/api/frame/frame.d.ts +++ b/types/openfin/_v2/api/frame/frame.d.ts @@ -1,6 +1,7 @@ import { Base, EmitterBase } from '../base'; import { Identity } from '../../identity'; import Transport from '../../transport/transport'; +import { FrameEvents } from '../events/frame'; export declare type EntityType = 'window' | 'iframe' | 'external connection' | 'unknown'; export interface FrameInfo { uuid: string; @@ -8,19 +9,40 @@ export interface FrameInfo { entityType: EntityType; parent: Identity; } +/** + * @lends Frame + */ export default class _FrameModule extends Base { /** - * Gets a reference to the specified frame. The frame does not have to exist - * @param {string} uuid - uuid of the frame you want to wrap - * @param {string} name - name of the frame you want to wrap + * Asynchronously returns a reference to the specified frame. The frame does not have to exist + * @param {Identity} identity - the identity of the frame you want to wrap * @return {Promise.<_Frame>} + * @tutorial Frame.wrap + * @static */ - wrap(uuid: string, name: string): Promise<_Frame>; + wrap(identity: Identity): Promise<_Frame>; /** - * Get a reference to the current frame + * Synchronously returns a reference to the specified frame. The frame does not have to exist + * @param {Identity} identity - the identity of the frame you want to wrap + * @return {_Frame} + * @tutorial Frame.wrapSync + * @static + */ + wrapSync(identity: Identity): _Frame; + /** + * Asynchronously returns a reference to the current frame * @return {Promise.<_Frame>} + * @tutorial Frame.getCurrent + * @static */ getCurrent(): Promise<_Frame>; + /** + * Synchronously returns a reference to the current frame + * @return {_Frame} + * @tutorial Frame.getCurrentSync + * @static + */ + getCurrentSync(): _Frame; } /** * @classdesc Represents a way to interact with `iframes`. Facilitates discovery of current context @@ -28,7 +50,7 @@ export default class _FrameModule extends Base { * @class * @alias Frame */ -export declare class _Frame extends EmitterBase { +export declare class _Frame extends EmitterBase { identity: Identity; constructor(wire: Transport, identity: Identity); /** @@ -45,7 +67,3 @@ export declare class _Frame extends EmitterBase { */ getParentWindow(): Promise; } -export interface _Frame { - on(type: 'connected', listener: (eventType: string) => void): Promise; - on(type: 'disconnected', listener: (eventType: string) => void): Promise; -} diff --git a/types/openfin/_v2/api/global-hotkey/index.d.ts b/types/openfin/_v2/api/global-hotkey/index.d.ts index 148ddff7e9..7aa08d6f20 100644 --- a/types/openfin/_v2/api/global-hotkey/index.d.ts +++ b/types/openfin/_v2/api/global-hotkey/index.d.ts @@ -1,10 +1,15 @@ import { EmitterBase } from '../base'; import Transport from '../../transport/transport'; +import { GlobalHotkeyEvents } from '../events/globalHotkey'; +export declare const enum nonHotkeyEvents { + REGISTERED = "registered", + UNREGISTERED = "unregistered" +} /** * The GlobalHotkey module can register/unregister a global hotkeys. * @namespace */ -export default class GlobalHotkey extends EmitterBase { +export default class GlobalHotkey extends EmitterBase { constructor(wire: Transport); /** * Registers a global hotkey with the operating system. diff --git a/types/openfin/_v2/api/interappbus/channel/index.d.ts b/types/openfin/_v2/api/interappbus/channel/index.d.ts index 1297d2c5ea..2b2d963932 100644 --- a/types/openfin/_v2/api/interappbus/channel/index.d.ts +++ b/types/openfin/_v2/api/interappbus/channel/index.d.ts @@ -4,30 +4,29 @@ import { ChannelProvider } from './provider'; import { EmitterBase } from '../../base'; import Transport, { Message, Payload } from '../../../transport/transport'; import { ProviderIdentity } from './channel'; -export interface Options { +import { ChannelEvents } from '../../events/channel'; +export interface ConnectOptions { wait?: boolean; - uuid: string; - name?: string; payload?: any; } export interface ChannelPayload { payload: Payload; } -export interface ChannelMessage { +export interface ChannelMessage extends Message { senderIdentity: Identity; ackToSender: any; - providerIdentity: Identity; + providerIdentity: ProviderIdentity; connectAction: boolean; } -export declare class Channel extends EmitterBase { +export declare class Channel extends EmitterBase { private channelMap; constructor(wire: Transport); getAllChannels(): Promise; - onChannelConnect(listener: Function): Promise; - onChannelDisconnect(listener: Function): Promise; - connect(options: Options): Promise; - create(channelName?: string): Promise; - onmessage: (msg: Message) => boolean; + onChannelConnect(listener: (...args: any[]) => void): Promise; + onChannelDisconnect(listener: (...args: any[]) => void): Promise; + connect(channelName: string, options?: ConnectOptions): Promise; + create(channelName: string): Promise; + onmessage: (msg: ChannelMessage) => boolean; private processChannelMessage; private processChannelConnection; } diff --git a/types/openfin/_v2/api/interappbus/channel/provider.d.ts b/types/openfin/_v2/api/interappbus/channel/provider.d.ts index a869928ac2..4b978c2781 100644 --- a/types/openfin/_v2/api/interappbus/channel/provider.d.ts +++ b/types/openfin/_v2/api/interappbus/channel/provider.d.ts @@ -1,13 +1,15 @@ import { ChannelBase, ProviderIdentity } from './channel'; import Transport from '../../../transport/transport'; -export declare type ConnectionListener = (adapterIdentity: ProviderIdentity, connectionMessage?: any) => any; +import { Identity } from '../../../main'; +export declare type ConnectionListener = (identity: Identity, connectionMessage?: any) => any; export declare class ChannelProvider extends ChannelBase { private connectListener; private disconnectListener; - connections: ProviderIdentity[]; + connections: Identity[]; constructor(providerIdentity: ProviderIdentity, send: Transport['sendAction']); - dispatch(to: ProviderIdentity, action: string, payload: any): Promise; - processConnection(senderId: ProviderIdentity, payload: any): Promise; + dispatch(to: Identity, action: string, payload: any): Promise; + processConnection(senderId: Identity, payload: any): Promise; publish(action: string, payload: any): Promise[]; onConnection(listener: ConnectionListener): void; + onDisconnection(listener: ConnectionListener): void; } diff --git a/types/openfin/_v2/api/notification/notification.d.ts b/types/openfin/_v2/api/notification/notification.d.ts index 8deec180ba..9a6bee7076 100644 --- a/types/openfin/_v2/api/notification/notification.d.ts +++ b/types/openfin/_v2/api/notification/notification.d.ts @@ -1,6 +1,7 @@ import { Base, EmitterBase } from '../base'; import { Identity } from '../../identity'; import Transport from '../../transport/transport'; +import { NotificationEvents } from '../events/notifications'; export declare class NotificationOptions { url: string; message: string; @@ -22,14 +23,12 @@ export interface NotificationCallback { * @class * @alias Notification */ -export declare class _Notification extends EmitterBase { +export declare class _Notification extends EmitterBase { private listenerList; private unhookAllListeners; - private buildLocalPayload; protected options: NotificationOptions; protected generalListener: (msg: any) => void; protected notificationId: number; - protected onmessage: (message: any) => boolean; constructor(wire: Transport, options: NotificationOptions); url: string; timeout: number | string; diff --git a/types/openfin/_v2/api/system/system.d.ts b/types/openfin/_v2/api/system/system.d.ts index 8c0bc7d3b6..31ed091619 100644 --- a/types/openfin/_v2/api/system/system.d.ts +++ b/types/openfin/_v2/api/system/system.d.ts @@ -19,6 +19,7 @@ import { RegistryInfo } from './registry-info'; import { DownloadPreloadOption, DownloadPreloadInfo } from './download-preload'; import { ClearCacheOption } from './clearCacheOption'; import { CrashReporterOption } from './crashReporterOption'; +import { SystemEvents } from '../events/system'; /** * AppAssetInfo interface * @typedef { Object } AppAssetInfo @@ -164,7 +165,7 @@ import { CrashReporterOption } from './crashReporterOption'; * clearing the cache and exiting the runtime. * @namespace */ -export default class System extends EmitterBase { +export default class System extends EmitterBase { constructor(wire: Transport); /** * Returns the version of the runtime. The version contains the major, minor, @@ -224,13 +225,6 @@ export default class System extends EmitterBase { * @tutorial System.getCrashReporterState */ getCrashReporterState(): Promise; - /** - * Returns a unique identifier (UUID) for the machine (SHA256 hash of the system's MAC address). - * This call will return the same value on subsequent calls on the same machine(host). - * The values will be different on different machines, and should be considered globally unique. - * @return {Promise.} - * @tutorial System.getDeviceId - */ getDeviceId(): Promise; /** * Start the crash reporter for the browser process if not already running. @@ -275,6 +269,12 @@ export default class System extends EmitterBase { * @tutorial System.getLog */ getLog(options: GetLogRequestType): Promise; + /** + * Returns a unique identifier (UUID) provided by the machine. + * @return {Promise.} + * @tutorial System.getMachineId + */ + getMachineId(): Promise; /** * Returns the minimum (inclusive) logging level that is currently being written to the log. * @return {Promise.} diff --git a/types/openfin/_v2/api/window/window.d.ts b/types/openfin/_v2/api/window/window.d.ts index 8d597a6446..ff89a89051 100644 --- a/types/openfin/_v2/api/window/window.d.ts +++ b/types/openfin/_v2/api/window/window.d.ts @@ -1,32 +1,52 @@ -import { Base, EmitterBase, RuntimeEvent } from '../base'; +import { Base, EmitterBase } from '../base'; import { Identity } from '../../identity'; import Bounds from './bounds'; -import BoundsChangedReply from './bounds-changed'; import { Transition, TransitionOptions } from './transition'; import { Application } from '../application/application'; import Transport from '../../transport/transport'; +import { WindowEvents } from '../events/window'; +/** + * @lends Window + */ export default class _WindowModule extends Base { - private instance; /** - * Returns a Window object that represents an existing window. - * @param { Identity } indentity + * Asynchronously returns a Window object that represents an existing window. + * @param { Identity } identity * @return {Promise.<_Window>} * @tutorial Window.wrap + * @static */ wrap(identity: Identity): Promise<_Window>; + /** + * Synchronously returns a Window object that represents an existing window. + * @param { Identity } identity + * @return {_Window} + * @tutorial Window.wrapSync + * @static + */ + wrapSync(identity: Identity): _Window; /** * Creates a new Window. * @param { * } options - Window creation options * @return {Promise.<_Window>} * @tutorial Window.create + * @static */ create(options: any): Promise<_Window>; /** - * Returns a Window object that represents the current window - * @return {Promise.} - * @tutorial window.getCurrent + * Asynchronously returns a Window object that represents the current window + * @return {Promise.<_Window>} + * @tutorial Window.getCurrent + * @static */ getCurrent(): Promise<_Window>; + /** + * Synchronously returns a Window object that represents the current window + * @return {_Window} + * @tutorial Window.getCurrentSync + * @static + */ + getCurrentSync(): _Window; } export interface CloseEventShape { name: string; @@ -47,6 +67,19 @@ export interface FrameInfo { entityType: string; parent?: Identity; } +export interface Area { + height: number; + width: number; + x: number; + y: number; +} +/** + * @typedef { Object } Area + * @property { number } height Area's height + * @property { number } width Area's width + * @property { number } x X coordinate of area's starting point + * @property { number } y Y coordinate of area's starting point + */ /** * @typedef {object} Transition * @property {Opacity} opacity - The Opacity transition @@ -98,7 +131,7 @@ this animation onto the end of the animation queue. * @class * @alias Window */ -export declare class _Window extends EmitterBase { +export declare class _Window extends EmitterBase { identity: Identity; /** * Raised when a window within this application requires credentials from the user. @@ -425,10 +458,8 @@ export declare class _Window extends EmitterBase { * @property {string} state - The preload script state: "load-failed", "failed", "succeeded" */ - private nativeWindow; constructor(wire: Transport, identity: Identity); createWindow(options: any): Promise<_Window>; - protected runtimeEventComparator: (listener: RuntimeEvent) => boolean; private windowListFromNameList; /** * Retrieves an array of frame info objects representing the main frame and any @@ -443,12 +474,6 @@ export declare class _Window extends EmitterBase { * @tutorial Window.getBounds */ getBounds(): Promise; - /** - * Returns the native JavaScript "window" object for the window. - * @return {Promise.} - * @tutorial Window.getNativeWindow - */ - getNativeWindow(): Promise; /** * Gives focus to the window. * @return {Promise.} @@ -561,11 +586,13 @@ export declare class _Window extends EmitterBase { */ getParentWindow(): Promise<_Window>; /** - * Gets a base64 encoded PNG snapshot of the window. + * Gets a base64 encoded PNG snapshot of the window or just part a of it. + * @param { Area } [area] The area of the window to be captured. + * Omitting it will capture the whole visible window. * @return {Promise.} * @tutorial Window.getSnapshot */ - getSnapshot(): Promise; + getSnapshot(area?: Area): Promise; /** * Gets the current state ("minimized", "maximized", or "restored") of the window. * @return {Promise.} @@ -747,13 +774,3 @@ export declare class _Window extends EmitterBase { */ stopNavigation(): Promise; } -export interface _Window { - on(type: 'focused', listener: Function): Promise; - on(type: 'initialized', listener: Function): Promise; - on(type: 'bounds-changed', listener: (data: BoundsChangedReply) => void): Promise; - on(type: 'hidden', listener: Function): Promise; - on(type: 'removeListener', listener: (eventType: string | symbol) => void): Promise; - on(type: 'newListener', listener: (eventType: string | symbol) => void): Promise; - on(type: 'closed', listener: (eventType: CloseEventShape) => void): Promise; - on(type: 'fire-constructor-callback', listener: Function): Promise; -} diff --git a/types/openfin/_v2/transport/transport.d.ts b/types/openfin/_v2/transport/transport.d.ts index fb7b967240..519562de95 100644 --- a/types/openfin/_v2/transport/transport.d.ts +++ b/types/openfin/_v2/transport/transport.d.ts @@ -3,6 +3,8 @@ import { Wire, WireConstructor, READY_STATE, ExistingConnectConfig, ConnectConfi import { Identity } from '../identity'; import { EventEmitter } from 'events'; import { Environment } from '../environment/environment'; +import { RuntimeEvent } from '../api/events/base'; +import { EventAggregator } from '../api/events/eventAggregator'; export declare type MessageHandler = (data: any) => boolean; declare class Transport extends EventEmitter { protected wireListeners: Map; protected uncorrelatedListener: Function; - protected messageHandlers: MessageHandler[]; me: Identity; protected wire: Wire; environment: Environment; topicRefMap: Map; sendRaw: Wire['send']; + eventAggregator: EventAggregator; + protected messageHandlers: MessageHandler[]; constructor(wireType: WireConstructor, environment: Environment); connectSync: (config: ConnectConfig) => any; connect(config: InternalConnectConfig): Promise; @@ -38,6 +41,20 @@ export declare class Message { payload: T; correlationId?: number; } +export declare class EventMessage implements Message { + action: 'process-desktop-event'; + payload: RuntimeEvent; +} +export declare class NotificationEventMessage implements Message { + action: 'process-notification-event'; + payload: NotificationEvent; +} +export interface NotificationEvent { + payload: { + notificationId: string; + }; + type: string | symbol; +} export declare class Payload { success: boolean; data: any; diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index fe34f0b630..a901fecdc9 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -1,12 +1,13 @@ -// Type definitions for OpenFin API 34.0 +// Type definitions for OpenFin API 37.0 // Project: https://openfin.co/ // Definitions by: Chris Barker // Ricardo de Pena // Roma +// Li Cui // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.9 -// based on v9.61.34.22 +// based on v9.61.37.14 // see https://openfin.co/support/technical-faq/#what-do-the-numbers-in-the-runtime-version-mean /** From 0b16775acbb3591cfd8714f91f485549d42e1e0d Mon Sep 17 00:00:00 2001 From: Dom Parfitt Date: Fri, 26 Oct 2018 21:07:23 +0100 Subject: [PATCH 0100/1121] Fixed typo in enum --- types/d3-graphviz/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/d3-graphviz/index.d.ts b/types/d3-graphviz/index.d.ts index 9d3dc1ac61..e3a30ce4f7 100644 --- a/types/d3-graphviz/index.d.ts +++ b/types/d3-graphviz/index.d.ts @@ -407,7 +407,7 @@ export type Engine = 'circo' | 'dot' | 'fdp' | 'neato' | 'osage' | 'patchwork' | export type TypeNames = 'initEnd' | 'start' | 'layoutStart' | 'layoutEnd' | 'dataExtractEnd' | 'dataProcessPass1End' | 'dataProcessPass2End' | 'dataProcessEnd' | 'renderStart' | 'renderEnd' | 'transitionStart' | 'transitionEnd' | - 'resotreEnd' | 'end' | string; // string included to allow for optional addition of a name, e.g. initEnd.foo + 'restoreEnd' | 'end' | string; // string included to allow for optional addition of a name, e.g. initEnd.foo /** * Enum defining the valid strings that can be passed as KeyModes From 46257f5c7bde050da55efd1039c1ed428ec303b0 Mon Sep 17 00:00:00 2001 From: Willy Zhang Date: Fri, 26 Oct 2018 20:33:32 -0700 Subject: [PATCH 0101/1121] Update CircuitBreaker with more functionality --- types/opossum/index.d.ts | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/types/opossum/index.d.ts b/types/opossum/index.d.ts index f1e14a939b..6ad4311af8 100644 --- a/types/opossum/index.d.ts +++ b/types/opossum/index.d.ts @@ -1,22 +1,25 @@ // Type definitions for opossum 1.8 // Project: https://github.com/bucharest-gold/opossum // Definitions by: Quinn Langille +// Willy Zhang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 /// import * as stream from "stream"; +import { EventEmitter } from "events"; -export type Action = () => any; +export type Action = (...args: any[]) => any; -export class CircuitBreaker { +export class CircuitBreaker extends EventEmitter { clearCache(): void; close(): void; disable(): void; enable(): void; - fallback(): CircuitBreaker; - fire(): Promise; - healthCheck(func: () => Promise, interval: number): Promise; + fallback(func?: (...args: any[]) => any): this; + fire(...args: any[]): Promise; + healthCheck(func: (...args: any[]) => Promise, interval?: number): Promise; + on(event: string | symbol, listener: (...args: any[]) => void): this; open(): void; promisify(action: Action): Promise; stats(): stream.Transform; @@ -33,6 +36,22 @@ export class CircuitBreaker { static readonly warmUp: symbol; } +export enum Event { + cacheHit = 'cacheHit', + cacheMiss = 'cacheMiss', + close = 'close', + failure = 'failure', + fallback = 'fallback', + fire = 'fire', + halfOpen = 'halfOpen', + healthCheckFailed = 'health-check-failed', + open = 'open', + reject = 'reject', + semaphoreLocked = 'semaphore-locked', + success = 'success', + timeout = 'timeout' +} + export interface CircuitBreakerOptions { timeout?: number; maxFailures?: number; From b4fad1da940bff44921573238f3e9e2ecb1cf77c Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Fri, 26 Oct 2018 22:45:27 +0200 Subject: [PATCH 0102/1121] [react-table] add typings for selectTableHOC and treeTableHOC --- types/react-table/index.d.ts | 5 ++- types/react-table/lib/hoc/hoc-type.d.ts | 5 +++ types/react-table/lib/hoc/selectTable.d.ts | 50 ++++++++++++++++++++++ types/react-table/lib/hoc/treeTable.d.ts | 10 +++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 types/react-table/lib/hoc/hoc-type.d.ts create mode 100644 types/react-table/lib/hoc/selectTable.d.ts create mode 100644 types/react-table/lib/hoc/treeTable.d.ts diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index ca7981a6f8..90ad254134 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for react-table 6.7 // Project: https://github.com/react-tools/react-table -// Definitions by: Roy Xue , Pavel Sakalo , Krzysztof Porębski +// Definitions by: Roy Xue +// Pavel Sakalo +// Krzysztof Porębski +// Grzegorz Rozdzialik // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-table/lib/hoc/hoc-type.d.ts b/types/react-table/lib/hoc/hoc-type.d.ts new file mode 100644 index 0000000000..9970d07a5b --- /dev/null +++ b/types/react-table/lib/hoc/hoc-type.d.ts @@ -0,0 +1,5 @@ +import { ComponentType } from 'react'; + +type HOC = ( + Component: ComponentType +) => ComponentType; diff --git a/types/react-table/lib/hoc/selectTable.d.ts b/types/react-table/lib/hoc/selectTable.d.ts new file mode 100644 index 0000000000..59cf9d1f17 --- /dev/null +++ b/types/react-table/lib/hoc/selectTable.d.ts @@ -0,0 +1,50 @@ +import { ComponentType } from 'react'; + +import { TableProps } from '../../index'; +import { HOC } from './hoc-type'; + +export type SelectType = 'checkbox' | 'radio'; + +export interface SelectInputComponentProps { + selectType: SelectType; + onClick: (key: string, shiftKeyPressed: boolean, row: any) => any; + checked: boolean; + id: string; + row: any; +} + +export interface SelectAllInputComponent { + selectType: SelectType; + checked: boolean; + onClick: () => any; +} + +export interface SelectTableAdditionalProps { + /** + * Default: _id + */ + keyField?: string; + + isSelected?: (key: string) => boolean; + + selectAll?: boolean; + + toggleAll?: SelectAllInputComponent['onClick']; + + toggleSelection?: SelectInputComponentProps['onClick']; + + /** + * Default: checkbox + */ + selectType?: SelectType; + + SelectInputComponent?: ComponentType; + SelectAllInputComponent?: ComponentType; +} + +declare const selectTableHOC: HOC< + Partial, + SelectTableAdditionalProps +>; + +export default selectTableHOC; diff --git a/types/react-table/lib/hoc/treeTable.d.ts b/types/react-table/lib/hoc/treeTable.d.ts new file mode 100644 index 0000000000..2f91951789 --- /dev/null +++ b/types/react-table/lib/hoc/treeTable.d.ts @@ -0,0 +1,10 @@ +import { ComponentType } from 'react'; + +import { TableProps } from '../../index'; +import { HOC } from './hoc-type'; + +interface TreeTableAdditionalProps {} + +declare const treeTableHOC: HOC, TreeTableAdditionalProps>; + +export default treeTableHOC; From 5c4f74febd6bdca0ad3afcd2ab740c513ff097ca Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Sat, 27 Oct 2018 13:12:02 +0200 Subject: [PATCH 0103/1121] [react-table] add tests for HOCs --- types/react-table/select-table-tests.tsx | 36 ++++++++++++++++++++++++ types/react-table/tree-table-tests.tsx | 21 ++++++++++++++ types/react-table/tsconfig.json | 4 ++- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 types/react-table/select-table-tests.tsx create mode 100644 types/react-table/tree-table-tests.tsx diff --git a/types/react-table/select-table-tests.tsx b/types/react-table/select-table-tests.tsx new file mode 100644 index 0000000000..1a29ed07c1 --- /dev/null +++ b/types/react-table/select-table-tests.tsx @@ -0,0 +1,36 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; + +import ReactTable, { Column } from 'react-table'; +import selectTableHOC, { + SelectTableAdditionalProps +} from 'react-table/lib/hoc/selectTable'; + +import 'react-table/react-table.css'; + +const SelectTable = selectTableHOC(ReactTable); + +const selectTableAdditionalProps: SelectTableAdditionalProps = { + isSelected: () => true, + keyField: 'id', + selectAll: true, + selectType: 'checkbox', + toggleAll: () => null, + toggleSelection: () => null +}; + +const data = [{ id: 1, name: 'Foo' }, { id: 2, name: 'Bar' }]; + +const columns: Column[] = [ + { Header: 'ID', accessor: 'id' }, + { Header: 'Name', accessor: 'name' } +]; + +ReactDOM.render( + , + document.getElementById('root') +); diff --git a/types/react-table/tree-table-tests.tsx b/types/react-table/tree-table-tests.tsx new file mode 100644 index 0000000000..14ad8265de --- /dev/null +++ b/types/react-table/tree-table-tests.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; + +import ReactTable, { Column } from 'react-table'; +import treeTableHOC from 'react-table/lib/hoc/treeTable'; + +import 'react-table/react-table.css'; + +const SelectTable = treeTableHOC(ReactTable); + +const data = [{ id: 1, name: 'Foo' }, { id: 2, name: 'Bar' }]; + +const columns: Column[] = [ + { Header: 'ID', accessor: 'id' }, + { Header: 'Name', accessor: 'name' } +]; + +ReactDOM.render( + , + document.getElementById('root') +); diff --git a/types/react-table/tsconfig.json b/types/react-table/tsconfig.json index de6f3f8e69..b08c4dc5c1 100644 --- a/types/react-table/tsconfig.json +++ b/types/react-table/tsconfig.json @@ -20,6 +20,8 @@ }, "files": [ "index.d.ts", - "react-table-tests.tsx" + "react-table-tests.tsx", + "select-table-tests.tsx", + "tree-table-tests.tsx" ] } \ No newline at end of file From e2ccb7a1434b5fd9556df5024210473582c5b980 Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Sat, 27 Oct 2018 13:22:34 +0200 Subject: [PATCH 0104/1121] [react-table] add missing options to selectTableHOC --- types/react-table/lib/hoc/hoc-type.d.ts | 9 ++++++++- types/react-table/lib/hoc/selectTable.d.ts | 14 +++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/types/react-table/lib/hoc/hoc-type.d.ts b/types/react-table/lib/hoc/hoc-type.d.ts index 9970d07a5b..c8bdcb462c 100644 --- a/types/react-table/lib/hoc/hoc-type.d.ts +++ b/types/react-table/lib/hoc/hoc-type.d.ts @@ -1,5 +1,12 @@ import { ComponentType } from 'react'; -type HOC = ( +export type HOC = ( Component: ComponentType ) => ComponentType; + +export type HOCWithOptions = < + Props extends OwnProps +>( + Component: ComponentType, + options?: Options +) => ComponentType; diff --git a/types/react-table/lib/hoc/selectTable.d.ts b/types/react-table/lib/hoc/selectTable.d.ts index 59cf9d1f17..910c5a34a4 100644 --- a/types/react-table/lib/hoc/selectTable.d.ts +++ b/types/react-table/lib/hoc/selectTable.d.ts @@ -1,7 +1,7 @@ import { ComponentType } from 'react'; import { TableProps } from '../../index'; -import { HOC } from './hoc-type'; +import { HOCWithOptions } from './hoc-type'; export type SelectType = 'checkbox' | 'radio'; @@ -42,9 +42,17 @@ export interface SelectTableAdditionalProps { SelectAllInputComponent?: ComponentType; } -declare const selectTableHOC: HOC< +export interface SelectTableHOCOptions { + /** + * Default: false + */ + floatingLeft?: boolean; +} + +declare const selectTableHOC: HOCWithOptions< Partial, - SelectTableAdditionalProps + SelectTableAdditionalProps, + SelectTableHOCOptions >; export default selectTableHOC; From 9fd15718934e0f32eebc3c758828180694e4016f Mon Sep 17 00:00:00 2001 From: Grzegorz Rozdzialik Date: Sat, 27 Oct 2018 13:40:04 +0200 Subject: [PATCH 0105/1121] [react-table] move HOC tests to a test directory Fixes linting error [react-table] inline HOC types --- types/react-table/lib/hoc/hoc-type.d.ts | 12 ------------ types/react-table/lib/hoc/selectTable.d.ts | 10 ++++------ types/react-table/lib/hoc/treeTable.d.ts | 7 +++---- types/react-table/{ => test}/select-table-tests.tsx | 0 types/react-table/{ => test}/tree-table-tests.tsx | 0 types/react-table/tsconfig.json | 6 ++++-- 6 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 types/react-table/lib/hoc/hoc-type.d.ts rename types/react-table/{ => test}/select-table-tests.tsx (100%) rename types/react-table/{ => test}/tree-table-tests.tsx (100%) diff --git a/types/react-table/lib/hoc/hoc-type.d.ts b/types/react-table/lib/hoc/hoc-type.d.ts deleted file mode 100644 index c8bdcb462c..0000000000 --- a/types/react-table/lib/hoc/hoc-type.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ComponentType } from 'react'; - -export type HOC = ( - Component: ComponentType -) => ComponentType; - -export type HOCWithOptions = < - Props extends OwnProps ->( - Component: ComponentType, - options?: Options -) => ComponentType; diff --git a/types/react-table/lib/hoc/selectTable.d.ts b/types/react-table/lib/hoc/selectTable.d.ts index 910c5a34a4..d70d84eb78 100644 --- a/types/react-table/lib/hoc/selectTable.d.ts +++ b/types/react-table/lib/hoc/selectTable.d.ts @@ -1,7 +1,6 @@ import { ComponentType } from 'react'; import { TableProps } from '../../index'; -import { HOCWithOptions } from './hoc-type'; export type SelectType = 'checkbox' | 'radio'; @@ -49,10 +48,9 @@ export interface SelectTableHOCOptions { floatingLeft?: boolean; } -declare const selectTableHOC: HOCWithOptions< - Partial, - SelectTableAdditionalProps, - SelectTableHOCOptions ->; +declare function selectTableHOC>( + Component: ComponentType, + options?: SelectTableHOCOptions +): ComponentType; export default selectTableHOC; diff --git a/types/react-table/lib/hoc/treeTable.d.ts b/types/react-table/lib/hoc/treeTable.d.ts index 2f91951789..35d1522119 100644 --- a/types/react-table/lib/hoc/treeTable.d.ts +++ b/types/react-table/lib/hoc/treeTable.d.ts @@ -1,10 +1,9 @@ import { ComponentType } from 'react'; import { TableProps } from '../../index'; -import { HOC } from './hoc-type'; -interface TreeTableAdditionalProps {} - -declare const treeTableHOC: HOC, TreeTableAdditionalProps>; +declare function treeTableHOC>( + Component: ComponentType +): ComponentType; export default treeTableHOC; diff --git a/types/react-table/select-table-tests.tsx b/types/react-table/test/select-table-tests.tsx similarity index 100% rename from types/react-table/select-table-tests.tsx rename to types/react-table/test/select-table-tests.tsx diff --git a/types/react-table/tree-table-tests.tsx b/types/react-table/test/tree-table-tests.tsx similarity index 100% rename from types/react-table/tree-table-tests.tsx rename to types/react-table/test/tree-table-tests.tsx diff --git a/types/react-table/tsconfig.json b/types/react-table/tsconfig.json index b08c4dc5c1..ef6f8f22a1 100644 --- a/types/react-table/tsconfig.json +++ b/types/react-table/tsconfig.json @@ -20,8 +20,10 @@ }, "files": [ "index.d.ts", + "lib/hoc/selectTable.d.ts", + "lib/hoc/treeTable.d.ts", "react-table-tests.tsx", - "select-table-tests.tsx", - "tree-table-tests.tsx" + "test/select-table-tests.tsx", + "test/tree-table-tests.tsx" ] } \ No newline at end of file From 002028303f1f200a17acee1ab5a1e9e8a50c414a Mon Sep 17 00:00:00 2001 From: "Matt R. Wilson" Date: Sat, 27 Oct 2018 23:05:03 -0600 Subject: [PATCH 0106/1121] [Luxon] toSQL opts and explain result. --- types/luxon/index.d.ts | 25 +++++++++++++++++++++---- types/luxon/luxon-tests.ts | 7 +++++++ types/luxon/tslint.json | 1 - 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/types/luxon/index.d.ts b/types/luxon/index.d.ts index 7253dc1ce6..8d5b17d697 100644 --- a/types/luxon/index.d.ts +++ b/types/luxon/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Colby DeHart // Hyeonseok Yang // Jonathan Siebern +// Matt R. Wilson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -22,6 +23,11 @@ declare module 'luxon' { round?: boolean; }; + type ToSQLOptions = { + includeOffset?: boolean; + includeZone?: boolean; + }; + type ISOTimeOptions = { suppressMilliseconds?: boolean; suppressSeconds?: boolean; @@ -65,6 +71,17 @@ declare module 'luxon' { conversionAccuracy?: string; }; + type ExplainedFormat = { + input: string; + tokens: Array<{ literal: boolean, val: string }>, + regex?: RegExp; + rawMatches?: RegExpMatchArray | null; + matches?: {[k: string]: any}; + result?: {[k: string]: any} | null; + zone?: Zone | null; + invalidReason?: string; + }; + class DateTime { static readonly DATETIME_FULL: DateTimeFormatOptions; static readonly DATETIME_FULL_WITH_SECONDS: DateTimeFormatOptions; @@ -108,7 +125,7 @@ declare module 'luxon' { text: string, format: string, opts?: DateTimeOptions - ): object; + ): ExplainedFormat; /** * @deprecated since 0.3.0. Use fromFormat instead */ @@ -124,7 +141,7 @@ declare module 'luxon' { text: string, format: string, options?: DateTimeOptions - ): object; + ): ExplainedFormat; static invalid(reason: any): DateTime; static local( year?: number, @@ -213,9 +230,9 @@ declare module 'luxon' { toMillis(): number; toObject(options?: { includeConfig?: boolean }): DateObject; toRFC2822(): string; - toSQL(options?: Object): string; + toSQL(options?: ToSQLOptions): string; toSQLDate(): string; - toSQLTime(options?: Object): string; + toSQLTime(options?: ToSQLOptions): string; toString(): string; toUTC(offset?: number, options?: ZoneOptions): DateTime; until(other: DateTime): Interval; diff --git a/types/luxon/luxon-tests.ts b/types/luxon/luxon-tests.ts index b7d426a2c2..587210815c 100644 --- a/types/luxon/luxon-tests.ts +++ b/types/luxon/luxon-tests.ts @@ -39,6 +39,11 @@ dt.toLocaleString(); dt.toLocaleString(DateTime.DATE_MED); dt.toISO(); dt.toISO({includeOffset: true}); +dt.toSQL(); +dt.toSQL({includeOffset: false, includeZone: true}); +dt.toSQLDate(); +dt.toSQLTime(); +dt.toSQLTime({includeOffset: false, includeZone: true}); dt.plus({ hours: 3, minutes: 2 }); dt.minus({ days: 7 }); @@ -62,6 +67,8 @@ DateTime.utc().toLocal(); DateTime.fromMillis(1527780819458).toMillis(); +const {input, result, zone} = DateTime.fromFormatExplain("Aug 6 1982", "MMMM d yyyy"); + /* Duration */ const dur = Duration.fromObject({ hours: 2, minutes: 7 }); dt.plus(dur); diff --git a/types/luxon/tslint.json b/types/luxon/tslint.json index 764ebe0c97..bc0a6d599a 100644 --- a/types/luxon/tslint.json +++ b/types/luxon/tslint.json @@ -1,7 +1,6 @@ { "extends": "dtslint/dt.json", "rules": { - "ban-types": false, "no-single-declare-module": false, "interface-over-type-literal": false, "no-declare-current-package": false From 6009b7e8bd6dae6a1b64a6e1e353971ba9edb415 Mon Sep 17 00:00:00 2001 From: barahliush Date: Sun, 28 Oct 2018 15:25:09 +0200 Subject: [PATCH 0107/1121] added interface for i18n plugin in store, updated signature in method "keyExists" --- types/vuex-i18n/index.d.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/types/vuex-i18n/index.d.ts b/types/vuex-i18n/index.d.ts index e1f607ef39..2c8c280e2f 100644 --- a/types/vuex-i18n/index.d.ts +++ b/types/vuex-i18n/index.d.ts @@ -1,9 +1,10 @@ -// Type definitions for vuex-i18n 1.7 +// Type definitions for vuex-i18n 1.10 // Project: https://github.com/dkfbasel/vuex-i18n // Definitions by: Cedric Kemp // Noam Kfir +// Suleimanov Artem // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.9 import _Vue, { PluginObject } from "vue"; @@ -17,6 +18,14 @@ declare module "vue/types/vue" { } } +export interface i18nState { + fallback: string; + locale: string; + translations: { + [key: string]: Translations; + }; +} + export interface Translations { [key: string]: string | Translations; } @@ -81,9 +90,14 @@ export interface Ii18n { localeExists(locale: string): boolean; /** - * check if the given key is available in the current or fallback locale + * check if the given key is available + * optional with a second parameter to limit the scope + * strict: only current locale (exact match) + * locale: current locale and parent language locale (i.e. en-us & en) + * fallback: current locale, parent language locale and fallback locale + * the default is fallback */ - keyExists(key: string): boolean; + keyExists(key: string, mode?: string): boolean; } declare const _default: { From 988a8af2422524f5eef7fb31278cb9efbe1c3af8 Mon Sep 17 00:00:00 2001 From: barahliush Date: Sun, 28 Oct 2018 15:40:43 +0200 Subject: [PATCH 0108/1121] added test for store's module interface --- types/vuex-i18n/vuex-i18n-tests.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/vuex-i18n/vuex-i18n-tests.ts b/types/vuex-i18n/vuex-i18n-tests.ts index 82d9d864d9..11010df30b 100644 --- a/types/vuex-i18n/vuex-i18n-tests.ts +++ b/types/vuex-i18n/vuex-i18n-tests.ts @@ -3,11 +3,16 @@ import Vue from "vue"; import { Store } from "vuex"; // load vuex i18n module -import vuexI18n from "vuex-i18n"; +import vuexI18n, { i18nState } from "vuex-i18n"; + +// declare interface for store's root state +interface RootState { + i18n: i18nState; +} // initialize the vuex store using the vuex module. note that you can change the -// name of the module if you wish -const store = new Store({}); +// name of the module if you wish +const store = new Store({}); // initialize the internationalization plugin on the vue instance. note that // the store must be passed to the plugin. the plugin will then generate some From 7015d5fc5b753310a5a34c37b79381fd4fc73c5c Mon Sep 17 00:00:00 2001 From: barahliush Date: Sun, 28 Oct 2018 16:00:55 +0200 Subject: [PATCH 0109/1121] fixed types in store's state --- types/vuex-i18n/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/vuex-i18n/index.d.ts b/types/vuex-i18n/index.d.ts index 2c8c280e2f..d2c5f60b08 100644 --- a/types/vuex-i18n/index.d.ts +++ b/types/vuex-i18n/index.d.ts @@ -19,8 +19,8 @@ declare module "vue/types/vue" { } export interface i18nState { - fallback: string; - locale: string; + fallback: string | null; + locale: string | null; translations: { [key: string]: Translations; }; From 9be14bb68c2b862206317cb4bd7e867786cbb4a6 Mon Sep 17 00:00:00 2001 From: barahliush Date: Sun, 28 Oct 2018 19:31:36 +0200 Subject: [PATCH 0110/1121] update signature for method "locale" --- types/vuex-i18n/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/vuex-i18n/index.d.ts b/types/vuex-i18n/index.d.ts index d2c5f60b08..8282b99c05 100644 --- a/types/vuex-i18n/index.d.ts +++ b/types/vuex-i18n/index.d.ts @@ -32,7 +32,7 @@ export interface Translations { export interface Ii18n { /** get the current locale */ - locale(): string; + locale(): string | null; /** get all the registered locales */ locales(): string[]; From 095ae0132fcad55dc7ca628102dc04c532164ce2 Mon Sep 17 00:00:00 2001 From: nixx quality Date: Sun, 28 Oct 2018 22:59:40 +0100 Subject: [PATCH 0111/1121] [@types/deep-diff] improve type safety and be up to date with 1.0.2 --- types/deep-diff/deep-diff-tests.ts | 4 +- types/deep-diff/index.d.ts | 81 ++++++++++++++++++++++-------- 2 files changed, 61 insertions(+), 24 deletions(-) diff --git a/types/deep-diff/deep-diff-tests.ts b/types/deep-diff/deep-diff-tests.ts index 42abf98ee1..5e71badae6 100644 --- a/types/deep-diff/deep-diff-tests.ts +++ b/types/deep-diff/deep-diff-tests.ts @@ -23,7 +23,7 @@ var rhs = { } }; -var differences: deepDiff.IDiff[] = diff(lhs, rhs); +var differences: deepDiff.Diff[] = diff(lhs, rhs); console.log(differences); @@ -53,7 +53,7 @@ var rhs = { } }; -observableDiff(lhs, rhs, function (d: deepDiff.IDiff) { +observableDiff(lhs, rhs, function (d) { // Apply all changes except those to the 'name' property... if (d.path.length !== 1 || d.path.join('.') !== 'name') { applyChange(lhs, rhs, d); diff --git a/types/deep-diff/index.d.ts b/types/deep-diff/index.d.ts index de17a03bc8..bdb278b8b0 100644 --- a/types/deep-diff/index.d.ts +++ b/types/deep-diff/index.d.ts @@ -1,42 +1,79 @@ -// Type definitions for deep-diff +// TypeScript Version: 2.3 +// Type definitions for deep-diff 1.0.2 // Project: https://github.com/flitbit/diff/ // Definitions by: ZauberNerd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace deepDiff { - interface IDiff { - kind: string; - path: string[]; - lhs: any; - rhs: any; - index?: number; - item?: IDiff; + + interface DiffNew { + kind: Kind; + path?: any[]; + rhs: RHS; } - interface IAccumulator { - push(diff: IDiff): void; + interface DiffDeleted { + kind: Kind; + path?: any[]; + lhs: LHS; + } + + interface DiffEdit { + kind: Kind; + path?: any[]; + lhs: LHS; + rhs: RHS; + } + + interface DiffArray { + kind: Kind; + path?: any[]; + index: number; + item: Diff; + } + + type Diff = DiffNew | DiffDeleted | DiffEdit | DiffArray; + + interface PreFilterFunction { + (path: any[], key: any): boolean; + } + interface PreFilterObject { + prefilter?(path: any[], key: any): boolean; + normalize?(currentPath: any, key: any, lhs: LHS, rhs: RHS): [ LHS, RHS ] | undefined; + } + type PreFilter = PreFilterFunction | PreFilterObject; + + interface Accumulator { + push(diff: Diff): void; length: number; } - interface IPrefilter { - (path: string[], key: string): boolean; + interface Observer { + (diff: Diff): void; } - interface IDeepDiff { - diff(lhs: Object, rhs: Object, prefilter?: IPrefilter, acc?: IAccumulator): IDiff[]; - diff(): IDiff; - observableDiff(lhs: Object, rhs: Object, changes: Function, prefilter?: IPrefilter, path?: string[], key?: string, stack?: Object[]): void; - applyDiff(target: Object, source: Object, filter: Function): void; - applyChange(target: Object, source: Object, change: IDiff): void; - revertChange(target: Object, source: Object, change: IDiff): void; + interface Filter { + (target: LHS, source: RHS, change: Diff): boolean; + } + + interface DeepDiff { + diff(lhs: LHS, rhs: RHS, prefilter?: PreFilter): Diff[] | undefined; + diff(lhs: LHS, rhs: RHS, prefilter?: PreFilter, acc?: Accumulator): Accumulator; + orderIndependentDiff: typeof DeepDiff.diff; + observableDiff(lhs: LHS, rhs: RHS, observer?: Observer, prefilter?: PreFilter, orderIndependent?: boolean): Diff[]; + orderIndependentDeepDiff(lhs: LHS, rhs: RHS, changes: Diff[], prefilter: PreFilter, path: any[], key: any, stack: any[]): void; + orderIndepHash(object: any): number; + applyDiff(target: LHS, source: RHS, filter?: Filter): void; + applyChange(target: LHS, source: any, change: Diff): void; + revertChange(target: LHS, source: any, change: Diff): void; isConflict(): boolean; - noConflict(): IDeepDiff; + noConflict(): DeepDiff; } } -declare var DeepDiff: deepDiff.IDeepDiff; +declare var DeepDiff: deepDiff.DeepDiff; declare module "deep-diff" { - var diff: deepDiff.IDeepDiff; + var diff: deepDiff.DeepDiff; export = diff; } From ec55d75f61aa1eb6fdbd99e96040d1ed00ce6f3a Mon Sep 17 00:00:00 2001 From: nixx quality Date: Sun, 28 Oct 2018 23:07:34 +0100 Subject: [PATCH 0112/1121] update the tslint.json while we're at it --- types/deep-diff/deep-diff-tests.ts | 21 ++++---- types/deep-diff/tslint.json | 80 +----------------------------- 2 files changed, 10 insertions(+), 91 deletions(-) diff --git a/types/deep-diff/deep-diff-tests.ts b/types/deep-diff/deep-diff-tests.ts index 5e71badae6..73c49b4d42 100644 --- a/types/deep-diff/deep-diff-tests.ts +++ b/types/deep-diff/deep-diff-tests.ts @@ -1,9 +1,7 @@ - - import _deepDiff = require('deep-diff'); -var diff = _deepDiff.diff; +const diff = _deepDiff.diff; -var lhs = { +let lhs = { name: 'my object', description: 'it\'s an object!', details: { @@ -13,7 +11,7 @@ var lhs = { } }; -var rhs = { +let rhs = { name: 'updated object', description: 'it\'s an object!', details: { @@ -23,17 +21,16 @@ var rhs = { } }; -var differences: deepDiff.Diff[] = diff(lhs, rhs); +const differences: Array> = diff(lhs, rhs); console.log(differences); - // -------------------------- -var observableDiff = _deepDiff.observableDiff; -var applyChange = _deepDiff.applyChange; +const observableDiff = _deepDiff.observableDiff; +const applyChange = _deepDiff.applyChange; -var lhs = { +lhs = { name: 'my object', description: 'it\'s an object!', details: { @@ -43,7 +40,7 @@ var lhs = { } }; -var rhs = { +rhs = { name: 'updated object', description: 'it\'s an object!', details: { @@ -53,7 +50,7 @@ var rhs = { } }; -observableDiff(lhs, rhs, function (d) { +observableDiff(lhs, rhs, d => { // Apply all changes except those to the 'name' property... if (d.path.length !== 1 || d.path.join('.') !== 'name') { applyChange(lhs, rhs, d); diff --git a/types/deep-diff/tslint.json b/types/deep-diff/tslint.json index a41bf5d19a..3db14f85ea 100644 --- a/types/deep-diff/tslint.json +++ b/types/deep-diff/tslint.json @@ -1,79 +1 @@ -{ - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } -} +{ "extends": "dtslint/dt.json" } From 23a5a5c1dfbd6d2d4ad94bd9f93865789b1cb0d6 Mon Sep 17 00:00:00 2001 From: nixx quality Date: Sun, 28 Oct 2018 23:10:24 +0100 Subject: [PATCH 0113/1121] guess the typescript version statement comes after the package name --- types/deep-diff/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/deep-diff/index.d.ts b/types/deep-diff/index.d.ts index bdb278b8b0..460c3ebe4a 100644 --- a/types/deep-diff/index.d.ts +++ b/types/deep-diff/index.d.ts @@ -1,5 +1,5 @@ -// TypeScript Version: 2.3 // Type definitions for deep-diff 1.0.2 +// TypeScript Version: 2.3 // Project: https://github.com/flitbit/diff/ // Definitions by: ZauberNerd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From f4cff5517cf4bf5154e37c32ae2e8b0952232098 Mon Sep 17 00:00:00 2001 From: nixx quality Date: Sun, 28 Oct 2018 23:13:52 +0100 Subject: [PATCH 0114/1121] maybe over here? --- types/deep-diff/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/deep-diff/index.d.ts b/types/deep-diff/index.d.ts index 460c3ebe4a..e83e0592e4 100644 --- a/types/deep-diff/index.d.ts +++ b/types/deep-diff/index.d.ts @@ -1,8 +1,8 @@ // Type definitions for deep-diff 1.0.2 -// TypeScript Version: 2.3 // Project: https://github.com/flitbit/diff/ // Definitions by: ZauberNerd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 declare namespace deepDiff { From f86348d4262199b913be64dd928f3ac8e7ac0a54 Mon Sep 17 00:00:00 2001 From: nixx quality Date: Sun, 28 Oct 2018 23:41:08 +0100 Subject: [PATCH 0115/1121] okay, I managed to get linting working properly so here's the linted version --- types/deep-diff/deep-diff-tests.ts | 8 +- types/deep-diff/index.d.ts | 123 ++++++++++++----------------- 2 files changed, 54 insertions(+), 77 deletions(-) diff --git a/types/deep-diff/deep-diff-tests.ts b/types/deep-diff/deep-diff-tests.ts index 73c49b4d42..6192dad9e5 100644 --- a/types/deep-diff/deep-diff-tests.ts +++ b/types/deep-diff/deep-diff-tests.ts @@ -1,5 +1,4 @@ -import _deepDiff = require('deep-diff'); -const diff = _deepDiff.diff; +import { diff, observableDiff, applyChange, Diff } from 'deep-diff'; let lhs = { name: 'my object', @@ -21,15 +20,12 @@ let rhs = { } }; -const differences: Array> = diff(lhs, rhs); +const differences: Array> = diff(lhs, rhs); console.log(differences); // -------------------------- -const observableDiff = _deepDiff.observableDiff; -const applyChange = _deepDiff.applyChange; - lhs = { name: 'my object', description: 'it\'s an object!', diff --git a/types/deep-diff/index.d.ts b/types/deep-diff/index.d.ts index e83e0592e4..c246e42501 100644 --- a/types/deep-diff/index.d.ts +++ b/types/deep-diff/index.d.ts @@ -1,79 +1,60 @@ -// Type definitions for deep-diff 1.0.2 +// Type definitions for deep-diff 1.0 // Project: https://github.com/flitbit/diff/ // Definitions by: ZauberNerd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -declare namespace deepDiff { - - interface DiffNew { - kind: Kind; - path?: any[]; - rhs: RHS; - } - - interface DiffDeleted { - kind: Kind; - path?: any[]; - lhs: LHS; - } - - interface DiffEdit { - kind: Kind; - path?: any[]; - lhs: LHS; - rhs: RHS; - } - - interface DiffArray { - kind: Kind; - path?: any[]; - index: number; - item: Diff; - } - - type Diff = DiffNew | DiffDeleted | DiffEdit | DiffArray; - - interface PreFilterFunction { - (path: any[], key: any): boolean; - } - interface PreFilterObject { - prefilter?(path: any[], key: any): boolean; - normalize?(currentPath: any, key: any, lhs: LHS, rhs: RHS): [ LHS, RHS ] | undefined; - } - type PreFilter = PreFilterFunction | PreFilterObject; - - interface Accumulator { - push(diff: Diff): void; - length: number; - } - - interface Observer { - (diff: Diff): void; - } - - interface Filter { - (target: LHS, source: RHS, change: Diff): boolean; - } - - interface DeepDiff { - diff(lhs: LHS, rhs: RHS, prefilter?: PreFilter): Diff[] | undefined; - diff(lhs: LHS, rhs: RHS, prefilter?: PreFilter, acc?: Accumulator): Accumulator; - orderIndependentDiff: typeof DeepDiff.diff; - observableDiff(lhs: LHS, rhs: RHS, observer?: Observer, prefilter?: PreFilter, orderIndependent?: boolean): Diff[]; - orderIndependentDeepDiff(lhs: LHS, rhs: RHS, changes: Diff[], prefilter: PreFilter, path: any[], key: any, stack: any[]): void; - orderIndepHash(object: any): number; - applyDiff(target: LHS, source: RHS, filter?: Filter): void; - applyChange(target: LHS, source: any, change: Diff): void; - revertChange(target: LHS, source: any, change: Diff): void; - isConflict(): boolean; - noConflict(): DeepDiff; - } +export interface DiffNew { + kind: Kind; + path?: any[]; + rhs: RHS; } -declare var DeepDiff: deepDiff.DeepDiff; - -declare module "deep-diff" { - var diff: deepDiff.DeepDiff; - export = diff; +export interface DiffDeleted { + kind: Kind; + path?: any[]; + lhs: LHS; } + +export interface DiffEdit { + kind: Kind; + path?: any[]; + lhs: LHS; + rhs: RHS; +} + +export interface DiffArray { + kind: Kind; + path?: any[]; + index: number; + item: Diff; +} + +export type Diff = DiffNew | DiffDeleted | DiffEdit | DiffArray; + +export type PreFilterFunction = (path: any[], key: any) => boolean; +export interface PreFilterObject { + prefilter?(path: any[], key: any): boolean; + normalize?(currentPath: any, key: any, lhs: LHS, rhs: RHS): [ LHS, RHS ] | undefined; +} +export type PreFilter = PreFilterFunction | PreFilterObject; + +export interface Accumulator { + push(diff: Diff): void; + length: number; +} + +export type Observer = (diff: Diff) => void; + +export type Filter = (target: LHS, source: RHS, change: Diff) => boolean; + +export function diff(lhs: LHS, rhs: RHS, prefilter?: PreFilter): Array> | undefined; +export function diff(lhs: LHS, rhs: RHS, prefilter?: PreFilter, acc?: Accumulator): Accumulator; +export function orderIndependentDiff(lhs: LHS, rhs: RHS, prefilter?: PreFilter): Array> | undefined; +export function orderIndependentDiff(lhs: LHS, rhs: RHS, prefilter?: PreFilter, acc?: Accumulator): Accumulator; +export function observableDiff(lhs: LHS, rhs: RHS, observer?: Observer, prefilter?: PreFilter, orderIndependent?: boolean): Array>; +export function orderIndependentDeepDiff(lhs: LHS, rhs: RHS, changes: Array>, prefilter: PreFilter, path: any[], key: any, stack: any[]): void; +export function orderIndepHash(object: any): number; +export function applyDiff(target: LHS, source: RHS, filter?: Filter): void; +export function applyChange(target: LHS, source: any, change: Diff): void; +export function revertChange(target: LHS, source: any, change: Diff): void; From 23c5cba61ccd1d9193f82a7f9c530b6c4a7f3138 Mon Sep 17 00:00:00 2001 From: Deyan Gunchev Date: Fri, 26 Oct 2018 16:15:39 +0300 Subject: [PATCH 0116/1121] Added 'url' option for file-saver typedef. --- types/file-saver/file-saver-tests.ts | 11 +++++++++++ types/file-saver/index.d.ts | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/types/file-saver/file-saver-tests.ts b/types/file-saver/file-saver-tests.ts index 7e704663d8..cea6d2fff5 100644 --- a/types/file-saver/file-saver-tests.ts +++ b/types/file-saver/file-saver-tests.ts @@ -22,6 +22,17 @@ function testWindowSaveAs() { window.saveAs(data, filename, disableAutoBOM); } +/** + * @summary Test for "saveAs" function with URL as first argument. + */ +function testUrlSaveAs() { + const url = 'https://example.com/test.txt'; + const filename = 'hello world.txt'; + const disableAutoBOM = true; + + window.saveAs(url, filename, disableAutoBOM); +} + /** * @summary Test for "saveAs" function with the 3rd parameter omitted */ diff --git a/types/file-saver/index.d.ts b/types/file-saver/index.d.ts index 267e49d261..524c5964bf 100644 --- a/types/file-saver/index.d.ts +++ b/types/file-saver/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for FileSaver.js 1.3 +// Type definitions for FileSaver.js 2.0 // Project: https://github.com/eligrey/FileSaver.js/ // Definitions by: Cyril Schumacher // Daniel Roth @@ -8,11 +8,11 @@ declare namespace FileSaver { /** * FileSaver.js implements the saveAs() FileSaver interface in browsers that do not natively support it. - * @param data - The actual file data blob. + * @param data - The actual file data blob or URL. * @param filename - The optional name of the file to be downloaded. If omitted, the name used in the file data will be used. If none is provided "download" will be used. * @param disableAutoBOM - Optional & defaults to `false`. Set to `true` if you want FileSaver.js to automatically provide Unicode text encoding hints */ - function saveAs(data: Blob, filename?: string, disableAutoBOM?: boolean): void; + function saveAs(data: Blob | string, filename?: string, disableAutoBOM?: boolean): void; } declare global { From 036eb5004c0a1cd01324228c949d60a8a7ada7ea Mon Sep 17 00:00:00 2001 From: taoqf Date: Mon, 29 Oct 2018 15:50:24 +0800 Subject: [PATCH 0117/1121] fix: add interface CanvasGradient --- types/weixin-app/index.d.ts | 107 ++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/types/weixin-app/index.d.ts b/types/weixin-app/index.d.ts index df1263f1b2..cba3990577 100644 --- a/types/weixin-app/index.d.ts +++ b/types/weixin-app/index.d.ts @@ -50,15 +50,15 @@ declare namespace wx { header?: RequestHeader; /** 默认为 GET,有效值:OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT */ method?: - | "GET" - | "OPTIONS" - | "GET" - | "HEAD" - | "POST" - | "PUT" - | "DELETE" - | "TRACE" - | "CONNECT"; + | "GET" + | "OPTIONS" + | "GET" + | "HEAD" + | "POST" + | "PUT" + | "DELETE" + | "TRACE" + | "CONNECT"; /** 如果设为json,会尝试对返回的数据做一次 JSON.parse */ dataType?: string; /** @@ -2611,6 +2611,9 @@ declare namespace wx { } type LineCapType = "butt" | "round" | "square"; type LineJoinType = "bevel" | "round" | "miter"; + interface CanvasGradient { + addColorStop(index: number, color: string): void; + } /** * context只是一个记录方法调用的容器,用于生成记录绘制行为的actions数组。context跟不存在对应关系,一个context生成画布的绘制动作数组可以应用于多个。 */ @@ -2873,7 +2876,7 @@ declare namespace wx { y0: number, x1: number, y1: number - ): void; + ): CanvasGradient; /** * 创建一个颜色的渐变点。 * Tip: 小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染。 @@ -3291,13 +3294,13 @@ declare namespace wx { // 开放接口-----设置 interface AuthSetting { scope: - | "scope.userInfo" - | "scope.userLocation" - | "scope.address" - | "scope.invoiceTitle" - | "scope.werun" - | "scope.record" - | "scope.writePhotosAlbum"; + | "scope.userInfo" + | "scope.userLocation" + | "scope.address" + | "scope.invoiceTitle" + | "scope.werun" + | "scope.record" + | "scope.writePhotosAlbum"; success?(res: ErrMsgResponse): void; fail?(): void; complete?(): void; @@ -3487,10 +3490,10 @@ declare namespace wx { } interface BuiltInEvent - extends BaseEvent {} + extends BaseEvent { } interface CustomEvent - extends BaseEvent {} + extends BaseEvent { } /** * 指定focus时的光标位置 @@ -3498,22 +3501,22 @@ declare namespace wx { */ interface InputEvent extends BuiltInEvent< - "input", - { - value: string; - cursor: number; - } - > {} + "input", + { + value: string; + cursor: number; + } + > { } interface FormEvent extends BuiltInEvent< - "form", - { - value: { [name: string]: string | boolean | number }; - } - > {} + "form", + { + value: { [name: string]: string | boolean | number }; + } + > { } - interface ScrollEvent extends BuiltInEvent<"scroll", {}> {} + interface ScrollEvent extends BuiltInEvent<"scroll", {}> { } interface Touch { identifier: number; @@ -3525,12 +3528,12 @@ declare namespace wx { interface TouchEvent extends BuiltInEvent< - T, - { - x: number; - y: number; - } - > { + T, + { + x: number; + y: number; + } + > { touches: Touch[]; changedTouches: Touch[]; } @@ -3670,7 +3673,7 @@ declare namespace wx { Data, Methods, Props - > = CombinedInstance & + > = CombinedInstance & Component; // CombinedInstance models the `this`, i.e. instance type for (user defined) component @@ -3679,9 +3682,9 @@ declare namespace wx { Data, Methods, Props - > = Methods & Instance; + > = Methods & Instance; - type Prop = (() => T) | { new (...args: any[]): T & object }; + type Prop = (() => T) | { new(...args: any[]): T & object }; type PropValidator = PropOptions | Prop | Array>; @@ -3723,7 +3726,7 @@ declare namespace wx { Data, Methods, Props - > = object & + > = object & ComponentOptions Data), Methods, Props> & ThisType>>; @@ -3786,7 +3789,7 @@ declare namespace wx { Data = DefaultData, Methods = DefaultMethods, Props = PropsDefinition - > extends Partial { + > extends Partial { /** * 组件的对外属性,是属性名到属性设置的映射表 * 属性设置中可包含三个字段: @@ -3839,7 +3842,7 @@ declare namespace wx { * 参见 [behaviors](https://mp.weixin.qq.com/debug/wxadoc/dev/framework/custom-component/behaviors.html) */ behaviors?: Array< - (ComponentOptions>) | string + (ComponentOptions>) | string >; /** @@ -3911,13 +3914,13 @@ declare namespace wx { setData( data: { [key in keyof D]?: - | string - | number - | boolean - | symbol - | object - | null - | any[] + | string + | number + | boolean + | symbol + | object + | null + | any[] }, callback?: () => void ): void; @@ -4168,7 +4171,7 @@ declare function Component( D, M, P - > + > ): wx.ExtendedComponent, D, M, P>; /** * behaviors 是用于组件间代码共享的特性 @@ -4184,7 +4187,7 @@ declare function Behavior( D, M, P - > + > ): wx.ExtendedComponent, D, M, P>; // #endregion // #region Page From 654a77c45e61694f5fa020680eba4448b312d312 Mon Sep 17 00:00:00 2001 From: Alex Kanunnikov Date: Mon, 29 Oct 2018 12:52:53 +0300 Subject: [PATCH 0118/1121] typescript plugin support Link to plugin - https://github.com/babel/babel/blob/master/packages/babel-parser/src/plugins/typescript.js --- types/babylon/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/babylon/index.d.ts b/types/babylon/index.d.ts index 07eb74bb32..b179f6f357 100644 --- a/types/babylon/index.d.ts +++ b/types/babylon/index.d.ts @@ -46,6 +46,7 @@ export type PluginName = 'estree' | 'jsx' | 'flow' | + 'typescript' | 'classConstructorCall' | 'doExpressions' | 'objectRestSpread' | From daf6ed8cd4f037d4dd9e15c98e4be832515b5a0c Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 29 Oct 2018 15:11:30 +0300 Subject: [PATCH 0119/1121] Add argument to .exists method `.exists()` has 1 optional argument https://airbnb.io/enzyme/docs/api/ShallowWrapper/exists.html --- types/enzyme/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 60262e3d04..0818b4e5ce 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -101,7 +101,7 @@ export interface CommonWrapper

> { /** * Returns whether or not the current node exists. */ - exists(): boolean; + exists(selector?: EnzymeSelector): boolean; /** * Returns a new wrapper with only the nodes of the current wrapper that don't match the provided selector. From 732040440df7b3b35244b09e24c893a9151dfd0e Mon Sep 17 00:00:00 2001 From: Alec Hill Date: Mon, 29 Oct 2018 12:25:51 +0000 Subject: [PATCH 0120/1121] Injected navigation props were incorrectly typed to provide only non-leaf route state props. Added tests for both kinds of injected route state. --- types/react-navigation/index.d.ts | 3 +- .../react-navigation-tests.tsx | 41 ++++++++++++++++--- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 1bdf43bc35..4be9671d66 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -25,6 +25,7 @@ // Denis Frezzato // Mickael Wegerich // Max Davidson +// Alec Hill // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -1240,7 +1241,7 @@ export type Omit = Pick>; export type InferProps> = T extends React.ComponentType ? P : never; export interface NavigationInjectedProps

{ - navigation: NavigationScreenProp; + navigation: NavigationScreenProp, P>; } // If the wrapped component is a class, we can get a ref to it diff --git a/types/react-navigation/react-navigation-tests.tsx b/types/react-navigation/react-navigation-tests.tsx index 47dd7baa0e..d2ef1d522c 100644 --- a/types/react-navigation/react-navigation-tests.tsx +++ b/types/react-navigation/react-navigation-tests.tsx @@ -17,12 +17,14 @@ import { NavigationNavigateAction, NavigationProp, NavigationResetAction, + NavigationRoute, NavigationRouteConfigMap, NavigationScreenProp, NavigationScreenProps, NavigationSetParamsAction, NavigationStackAction, NavigationStackScreenOptions, + NavigationStateRoute, NavigationTabScreenOptions, NavigationTransitionProps, StackViewTransitionConfigs, @@ -70,10 +72,22 @@ interface StartScreenNavigationParams { */ class StartScreen extends React.Component> { render() { - // Implicit type checks. + // Injected type checks + const props: NavigationInjectedProps = this.props; + // route state... + const navigationState: NavigationRoute = this.props.navigation.state; + const index: number = navigationState.index; + const key: string = navigationState.key; + const routeName: string = navigationState.routeName; + const path: string | undefined = navigationState.path; + let routes: NavigationRoute[]; + if (isNavigationStateRoute(navigationState)) { + routes = navigationState.routes; + } + // params... const navigationStateParams: StartScreenNavigationParams | undefined = this.props.navigation.state.params; - const id = this.props.navigation.state.params && this.props.navigation.state.params.id; - const s = this.props.navigation.state.params && this.props.navigation.state.params.s; + const id: number | undefined = this.props.navigation.state.params && this.props.navigation.state.params.id; + const s: string | undefined = this.props.navigation.state.params && this.props.navigation.state.params.s; return ( @@ -107,17 +121,32 @@ interface NextScreenNavigationParams { class NextScreen extends React.Component> { render() { - // Implicit type checks. - const navigationStateParams: NextScreenNavigationParams | undefined = this.props.navigation.state.params; + // Injected type checks + const props: NavigationInjectedProps = this.props; + // route state... + const navigationState: NavigationRoute = this.props.navigation.state; + const index: number = navigationState.index; + const key: string = navigationState.key; + const routeName: string = navigationState.routeName; + const path: string | undefined = navigationState.path; + let routes: NavigationRoute[]; + if (isNavigationStateRoute(navigationState)) { + routes = navigationState.routes; + } + // params... + const navigationStateParams: NextScreenNavigationParams | undefined = navigationState.params; const id = this.props.navigation.state.params && this.props.navigation.state.params.id; const name = this.props.navigation.getParam('name', 'Peter'); - return ( ); } } +function isNavigationStateRoute

(route: NavigationRoute

): route is NavigationStateRoute

{ + return !!(route as NavigationStateRoute

).routes; +} + const navigationOptions = { headerBackTitle: null, }; From 6acfee7450ecb3a69e9c9827d337717562363f1a Mon Sep 17 00:00:00 2001 From: Alec Hill Date: Mon, 29 Oct 2018 15:47:20 +0000 Subject: [PATCH 0121/1121] Removed Slessi from authors on request --- types/react-navigation/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index 4be9671d66..3562072601 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -14,7 +14,6 @@ // Steven Miller // Armando Assuncao // Ciaran Liedeman -// Edward Sammut Alessi // Jérémy Magrin // Luca Campana // Ullrich Schaefer From 4711ffd07c74802822e5437aa2c16403afe95d5f Mon Sep 17 00:00:00 2001 From: Clayton Astrom Date: Mon, 29 Oct 2018 10:57:11 -0500 Subject: [PATCH 0122/1121] Reverted version to 0.9 --- types/nightwatch/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index c96570691f..01e1d99aa6 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for nightwatch 1.0 +// Type definitions for nightwatch 0.9 // Project: http://nightwatchjs.org/api // Definitions by: Rahul Kavalapara // Connor Schlesiger From 1275c5d02d12be60f25e80a73843007d23364949 Mon Sep 17 00:00:00 2001 From: licui Date: Mon, 29 Oct 2018 17:18:44 -0400 Subject: [PATCH 0123/1121] update v2 api --- .../_v2/api/application/application.d.ts | 8 +-- types/openfin/_v2/api/system/process.d.ts | 65 +++++++++++++++---- 2 files changed, 56 insertions(+), 17 deletions(-) diff --git a/types/openfin/_v2/api/application/application.d.ts b/types/openfin/_v2/api/application/application.d.ts index b5797aa7ad..8470f65f55 100644 --- a/types/openfin/_v2/api/application/application.d.ts +++ b/types/openfin/_v2/api/application/application.d.ts @@ -22,7 +22,7 @@ export declare class NavigationRejectedReply extends Reply<'window-navigation-re sourceName: string; url: string; } -export interface ConfigInterface { +export interface ShortCutConfig { desktop?: boolean; startMenu?: boolean; systemStartup?: boolean; @@ -138,10 +138,10 @@ export declare class Application extends EmitterBase { getParentUuid(): Promise; /** * Retrieves current application's shortcut configuration. - * @return {Promise.} + * @return {Promise.} * @tutorial Application.getShortcuts */ - getShortcuts(): Promise; + getShortcuts(): Promise; /** * Returns the current zoom level of the application. * @return {Promise.} @@ -202,7 +202,7 @@ export declare class Application extends EmitterBase { * @return {Promise.} * @tutorial Application.setShortcuts */ - setShortcuts(config: ConfigInterface): Promise; + setShortcuts(config: ShortCutConfig): Promise; /** * Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20% * larger or smaller to default limits of 300% and 50% of original size, respectively. diff --git a/types/openfin/_v2/api/system/process.d.ts b/types/openfin/_v2/api/system/process.d.ts index 8a513ceecd..4a965d78d3 100644 --- a/types/openfin/_v2/api/system/process.d.ts +++ b/types/openfin/_v2/api/system/process.d.ts @@ -1,15 +1,54 @@ export interface ProcessInfo { - cpuUsage: number; - name: string; - nonPagedPoolUsage: number; - pageFaultCount: number; - pagedPoolUsage: number; - pagefileUsage: number; - peakNonPagedPoolUsage: number; - peakPagedPoolUsage: number; - peakPagefileUsage: number; - peakWorkingSetSize: number; - processId: number; - uuid: string; - workingSetSize: number; + /** + * the percentage of total CPU usage + */ + cpuUsage?: number; + /** + * the application name + */ + name?: string; + /** + * the current nonpaged pool usage in bytes + */ + nonPagedPoolUsage?: number; + /** + * the number of page faults + */ + pageFaultCount?: number; + /** + * the current paged pool usage in bytes + */ + pagedPoolUsage?: number; + /** + * the total amount of memory in bytes that the memory manager has committed + */ + pagefileUsage?: number; + /** + * the peak nonpaged pool usage in bytes + */ + peakNonPagedPoolUsage?: number; + /** + * the peak paged pool usage in bytes + */ + peakPagedPoolUsage?: number; + /** + * the peak value in bytes of pagefileUsage during the lifetime of this process + */ + peakPagefileUsage?: number; + /** + * the peak working set size in bytes + */ + peakWorkingSetSize?: number; + /** + * the native process identifier + */ + processId?: number; + /** + * the application UUID + */ + uuid?: string; + /** + * the current working set size (both shared and private data) in bytes + */ + workingSetSize?: number; } From 3b9e843cb4a862ad69f51cae83796a10b935caf1 Mon Sep 17 00:00:00 2001 From: licui Date: Mon, 29 Oct 2018 17:19:38 -0400 Subject: [PATCH 0124/1121] update v1 to use v2 shapes (partially) --- types/openfin/index.d.ts | 183 +++++---------------------------- types/openfin/openfin-tests.ts | 3 +- 2 files changed, 26 insertions(+), 160 deletions(-) diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index a901fecdc9..bc71eeed85 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -24,16 +24,31 @@ * When running within the OpenFin Runtime your web applications have access to the "fin" namespace and all the modules within the API * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "documennt" objects. */ +import { Identity } from './_v2/identity'; +import { ShortCutConfig } from './_v2/api/application/application'; +import { ExternalApplicationInfo } from './_v2/api/external-application/external-application'; +import { ClearCacheOption } from './_v2/api/system/clearCacheOption'; +import { CookieInfo, CookieOption } from './_v2/api/system/cookie'; +import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './_v2/api/system/download-asset'; +import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/download-preload'; +import { EntityInfo } from './_v2/api/system/entity'; +import { ProcessInfo } from './_v2/api/system/process'; +import { RegistryInfo } from './_v2/api/system/registry-info'; + +// tslint:disable-next-line:export-just-namespace +export = fin; +export as namespace fin; + declare namespace fin { - var Application: import('./_v2/api/application/application').default - var Clipboard: import('./_v2/api/clipboard/clipboard').default + var Application: import('./_v2/api/application/application').default; + var Clipboard: import('./_v2/api/clipboard/clipboard').default; var ExternalApplication: import('./_v2/api/external-application/external-application').default - var Frame: import('./_v2/api/frame/frame').default - var GlobalHotkey: import('./_v2/api/global-hotkey/index').default - var InterApplicationBus: import('./_v2/api/interappbus/interappbus').default - var Notification: import('./_v2/api/notification/notification').default - var System: import('./_v2/api/system/system').default - var Window: import('./_v2/api/window/window').default + var Frame: import('./_v2/api/frame/frame').default; + var GlobalHotkey: import('./_v2/api/global-hotkey/index').default; + var InterApplicationBus: import('./_v2/api/interappbus/interappbus').default; + var Notification: import('./_v2/api/notification/notification').default; + var System: import('./_v2/api/system/system').default; + var Window: import('./_v2/api/window/window').default; const desktop: OpenFinDesktop; @@ -189,21 +204,6 @@ declare namespace fin { uuid: string; } - interface ShortCutConfig { - /** - * application has a shortcut on the desktop - */ - desktop?: boolean; - /** - * application has no shortcut in the start menu - */ - startMenu?: boolean; - /** - * application will be launched on system startup - */ - systemStartup?: boolean; - } - interface SuccessObj { httpResponseCode: number; } @@ -638,7 +638,7 @@ declare namespace fin { * Clears cached data containing window state/positions, * application resource files (images, HTML, JavaScript files), cookies, and items stored in the Local Storage. */ - clearCache(options: CacheOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + clearCache(options: ClearCacheOption, callback?: () => void, errorCallback?: (reason: string) => void): void; /** * Clears all cached data when OpenFin Runtime exits. */ @@ -684,7 +684,7 @@ declare namespace fin { /** * Returns information about the app asset. */ - getAppAssetInfo(options: AppAssetOptions, callback?: (appAssetInfo: AppAssetInfo) => void, errorCallback?: (reason: string) => void): void; + getAppAssetInfo(options: AppAssetRequest, callback?: (appAssetInfo: AppAssetInfo) => void, errorCallback?: (reason: string) => void): void; /** * Get additional info of cookies. */ @@ -830,27 +830,6 @@ declare namespace fin { updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; } - interface CacheOptions { - cache?: boolean; - cookies?: boolean; - localStorage?: boolean; - appcache?: boolean; - userData?: boolean; - } - - interface AppAssetInfo { - src?: string; - alias?: string; - version?: string; - target?: string; - args?: string; - mandatory?: boolean; - } - - interface AppAssetOptions { - alias: string; - } - interface ApplicationInfo { /** * true when the application is running. @@ -866,56 +845,6 @@ declare namespace fin { parentUuid?: string; } - interface Identity { - uuid: string; - name: string; - } - - interface EntityInfo { - name: string; - uuid: string; - parent: Identity; - entityType: string; - } - - interface DownloadPreloadOption { - url: string; - } - - interface DownloadPreloadInfo { - success: boolean; - url?: string; - error: string; - } - - interface CookieInfo { - name: string; - // expirationDate: Date; - domain: string; - path: string; - } - - interface CookieOption { - name: string; - } - - interface RegistryInfo { - data: any; - rootKey: string; - subkey: string; - type: string; - value: string; - } - - interface RuntimeDownloadOptions { - version: string; - } - - interface RuntimeDownloadProgress { - downloadedBytes: number; - totalBytes: number; - } - interface WindowDetails { uuid?: string; mainWindow?: WindowInfo; @@ -1015,61 +944,6 @@ declare namespace fin { date?: string; } - interface ProcessInfo { - /** - * the percentage of total CPU usage - */ - cpuUsage?: number; - /** - * the application name - */ - name?: string; - /** - * the current nonpaged pool usage in bytes - */ - nonPagedPoolUsage?: number; - /** - * the number of page faults - */ - pageFaultCount?: number; - /** - * the current paged pool usage in bytes - */ - pagedPoolUsage?: number; - /** - * the total amount of memory in bytes that the memory manager has committed - */ - pagefileUsage?: number; - /** - * the peak nonpaged pool usage in bytes - */ - peakNonPagedPoolUsage?: number; - /** - * the peak paged pool usage in bytes - */ - peakPagedPoolUsage?: number; - /** - * the peak value in bytes of pagefileUsage during the lifetime of this process - */ - peakPagefileUsage?: number; - /** - * the peak working set size in bytes - */ - peakWorkingSetSize?: number; - /** - * the native process identifier - */ - processId?: number; - /** - * the application UUID - */ - uuid?: string; - /** - * the current working set size (both shared and private data) in bytes - */ - workingSetSize?: number; - } - interface ProxyInfo { /** * the configured Proxy Address @@ -1797,13 +1671,6 @@ declare namespace fin { width?: number; } - interface ExternalApplicationInfo { - parent: { - uuid: string; - name: string; - }; - } - interface SessionChangedEvent { /** * the action that triggered this event: diff --git a/types/openfin/openfin-tests.ts b/types/openfin/openfin-tests.ts index 6059f54de7..9c8b714d05 100644 --- a/types/openfin/openfin-tests.ts +++ b/types/openfin/openfin-tests.ts @@ -235,8 +235,7 @@ function test_system() { cache: true, cookies: true, localStorage: true, - appcache: true, - userData: true + appcache: true }); // deleteCacheOnExit fin.desktop.System.deleteCacheOnExit(() => { From 21f0542772817bb19fd2584d4fbb7c63ccf117bf Mon Sep 17 00:00:00 2001 From: taoqf Date: Tue, 30 Oct 2018 10:46:58 +0800 Subject: [PATCH 0125/1121] [weixain-app] fix return types --- types/weixin-app/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/weixin-app/index.d.ts b/types/weixin-app/index.d.ts index cba3990577..99bc9ffa09 100644 --- a/types/weixin-app/index.d.ts +++ b/types/weixin-app/index.d.ts @@ -974,7 +974,7 @@ declare namespace wx { * 异步获取当前storage的相关信息 */ function getStorageInfo(options: GetStorageInfoOptions): void; - function getStorageInfoSync(): GetStorageInfoOptions; + function getStorageInfoSync(): StorageInfo; interface RemoveStorageOptions extends BaseOptions { key: string; success?(res: DataResponse): void; From 3024a9dd0e27b00ec820f2e4f10f6582dbcc4d8b Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Tue, 30 Oct 2018 12:35:20 +0100 Subject: [PATCH 0126/1121] Wait until support for typescript 3 arrives. https://github.com/Microsoft/dtslint/issues/137 https://github.com/Microsoft/definitelytyped-header-parser/pull/15 --- types/terser/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index f9367436c8..ea57a27c53 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 +// No support for typescript version 3. See https://github.com/Microsoft/dtslint/issues/137 import * as MOZ_SourceMap from "source-map"; From 0db454c3b9e31ff93d4ed1c9d5fdd9ac624e4642 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 30 Oct 2018 13:13:16 +0100 Subject: [PATCH 0127/1121] fix: add grayscale theme to Victory See https://github.com/FormidableLabs/victory-core/blob/8c3ee289ab47a05867b1b086302d16cbdd475235/src/victory-theme/victory-theme.js --- types/victory/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/victory/index.d.ts b/types/victory/index.d.ts index 5b245440bd..5670547317 100644 --- a/types/victory/index.d.ts +++ b/types/victory/index.d.ts @@ -513,6 +513,7 @@ declare module "victory" { /** * Default theme */ + grayscale: VictoryThemeDefinition; material: VictoryThemeDefinition; } From 9d052807cc11561a69aefc6ef238613958e316ec Mon Sep 17 00:00:00 2001 From: licui Date: Tue, 30 Oct 2018 11:12:28 -0400 Subject: [PATCH 0128/1121] update v2 shapes --- types/openfin/_v2/api/system/application.d.ts | 1 + types/openfin/_v2/api/system/process.d.ts | 39 ------ types/openfin/_v2/api/system/system.d.ts | 118 ++++++++++++------ types/openfin/_v2/api/system/window.d.ts | 14 ++- 4 files changed, 90 insertions(+), 82 deletions(-) diff --git a/types/openfin/_v2/api/system/application.d.ts b/types/openfin/_v2/api/system/application.d.ts index 9d7ea09b67..0e14602942 100644 --- a/types/openfin/_v2/api/system/application.d.ts +++ b/types/openfin/_v2/api/system/application.d.ts @@ -1,4 +1,5 @@ export interface ApplicationInfo { isRunning: boolean; uuid: string; + parentUuid?: string; } diff --git a/types/openfin/_v2/api/system/process.d.ts b/types/openfin/_v2/api/system/process.d.ts index 4a965d78d3..98901db137 100644 --- a/types/openfin/_v2/api/system/process.d.ts +++ b/types/openfin/_v2/api/system/process.d.ts @@ -1,54 +1,15 @@ export interface ProcessInfo { - /** - * the percentage of total CPU usage - */ cpuUsage?: number; - /** - * the application name - */ name?: string; - /** - * the current nonpaged pool usage in bytes - */ nonPagedPoolUsage?: number; - /** - * the number of page faults - */ pageFaultCount?: number; - /** - * the current paged pool usage in bytes - */ pagedPoolUsage?: number; - /** - * the total amount of memory in bytes that the memory manager has committed - */ pagefileUsage?: number; - /** - * the peak nonpaged pool usage in bytes - */ peakNonPagedPoolUsage?: number; - /** - * the peak paged pool usage in bytes - */ peakPagedPoolUsage?: number; - /** - * the peak value in bytes of pagefileUsage during the lifetime of this process - */ peakPagefileUsage?: number; - /** - * the peak working set size in bytes - */ peakWorkingSetSize?: number; - /** - * the native process identifier - */ processId?: number; - /** - * the application UUID - */ uuid?: string; - /** - * the current working set size (both shared and private data) in bytes - */ workingSetSize?: number; } diff --git a/types/openfin/_v2/api/system/system.d.ts b/types/openfin/_v2/api/system/system.d.ts index 31ed091619..497bd5f358 100644 --- a/types/openfin/_v2/api/system/system.d.ts +++ b/types/openfin/_v2/api/system/system.d.ts @@ -36,6 +36,23 @@ import { SystemEvents } from '../events/system'; * @typedef { Object } AppAssetRequest * @property { string } alias The name of the asset */ +/** + * ApplicationInfo interface + * @typedef { Object } ApplicationInfo + * @property { boolean } isRunning true when the application is running + * @property { string } uuid uuid of the application + * @property { string } parentUuid uuid of the application that launches this application + */ +/** + * @typedef { Object } ClearCacheOption + * @summary Clear cache options. + * @desc These are the options required by the clearCache function. + * + * @property {boolean} appcache html5 application cache + * @property {boolean} cache browser data cache for html files and images + * @property {boolean} cookies browser cookies + * @property {boolean} localStorage browser data that can be used across sessions + */ /** * CookieInfo interface * @typedef { Object } CookieInfo @@ -49,18 +66,26 @@ import { SystemEvents } from '../events/system'; * @property { string } name The name of the cookie */ /** - * ExternalConnection interface - * @typedef { Object } ExternalConnection - * @property { string } token The token to broker an external connection - * @property { string } uuid The uuid of the external connection +* CrashReporterOption interface +* @typedef { Object } CrashReporterOption +* @property { boolean } diagnosticMode In diagnostic mode the crash reporter will send diagnostic logs to +* the OpenFin reporting service on runtime shutdown +* @property { boolean } isRunning check if it's running +*/ +/** + * DownloadPreloadInfo interface + * @typedef { Object } DownloadPreloadInfo + * @desc downloadPreloadScripts function return value + * @property { string } url url to the preload script + * @property { string } error error during preload script acquisition + * @property { boolean } succeess download operation success */ /** -* ExternalProcessRequestType interface -* @typedef { Object } ExternalProcessRequestType -* @property { string } path The file path to where the running application resides -* @property { string } arguments The argument passed to the running application -* @property { Object } listener This is described in the {LaunchExternalProcessListner} type definition -*/ + * DownloadPreloadOption interface + * @typedef { Object } DownloadPreloadOption + * @desc These are the options object required by the downloadPreloadScripts function + * @property { string } url url to the preload script + */ /** * Entity interface * @typedef { Object } Entity @@ -75,6 +100,19 @@ import { SystemEvents } from '../events/system'; * @property { Identity } parent The parent of the entity * @property { string } entityType The type of the entity */ +/** + * ExternalConnection interface + * @typedef { Object } ExternalConnection + * @property { string } token The token to broker an external connection + * @property { string } uuid The uuid of the external connection + */ +/** +* ExternalProcessRequestType interface +* @typedef { Object } ExternalProcessRequestType +* @property { string } path The file path to where the running application resides +* @property { string } arguments The argument passed to the running application +* @property { Object } listener This is described in the {LaunchExternalProcessListner} type definition +*/ /** * GetLogRequestType interface * @typedef { Object } GetLogRequestType @@ -99,6 +137,23 @@ import { SystemEvents } from '../events/system'; * @property { string } error error and above * @property { string } fatal fatal only, indicates a crash is imminent */ +/** + * ProcessInfo interface + * @typedef { Object } ProcessInfo + * @property { numder } cpuUsage The percentage of total CPU usage + * @property { string } name The application name + * @property { number } nonPagedPoolUsage The current nonpaged pool usage in bytes + * @property { number } pageFaultCount The number of page faults + * @property { number } pagedPoolUsage The current paged pool usage in bytes + * @property { number } pagefileUsage The total amount of memory in bytes that the memory manager has committed + * @property { number } peakNonPagedPoolUsage The peak nonpaged pool usage in bytes + * @property { number } peakPagedPoolUsage The peak paged pool usage in bytes + * @property { number } peakPagefileUsage The peak value in bytes of pagefileUsage during the lifetime of this process + * @property { number } peakWorkingSetSize The peak working set size in bytes + * @property { number } processId The native process identifier + * @property { string } uuid The application UUID + * @property { nubmer } workingSetSize The current working set size (both shared and private data) in bytes + */ /** * ProxyConfig interface * @typedef { Object } ProxyConfig @@ -129,36 +184,25 @@ import { SystemEvents } from '../events/system'; * @property { boolean } killtree Value to terminate the running application */ /** - * DownloadPreloadOption interface - * @typedef { Object } DownloadPreloadOption - * @desc These are the options object required by the downloadPreloadScripts function - * @property { string } url url to the preload script + * WindowDetail interface + * @typedef { Object } WindowDetail + * @property { number } bottom The bottom-most coordinate of the window + * @property { number } height The height of the window + * @property { boolean } isShowing Value to check if the window is showing + * @property { number } left The left-most coordinate of the window + * @property { string } name The name of the window + * @property { number } right The right-most coordinate of the window + * @property { string } state The window state + * @property { number } top The top-most coordinate of the window + * @property { number } width The width of the window */ /** - * DownloadPreloadInfo interface - * @typedef { Object } DownloadPreloadInfo - * @desc downloadPreloadScripts function return value - * @property { string } url url to the preload script - * @property { string } error error during preload script acquisition - * @property { boolean } succeess download operation success + * WindowInfo interface + * @typedef { Object } WindowInfo + * @property { Array } childWindows The array of child windows details + * @property { WindowDetail } mainWindow The main window detail + * @property { string } uuid The uuid of the application */ -/** - * @typedef { Object } ClearCacheOption - * @summary Clear cache options. - * @desc These are the options required by the clearCache function. - * - * @property {boolean} appcache html5 application cache - * @property {boolean} cache browser data cache for html files and images - * @property {boolean} cookies browser cookies - * @property {boolean} localStorage browser data that can be used across sessions - */ -/** -* CrashReporterOption interface -* @typedef { Object } CrashReporterOption -* @property { boolean } diagnosticMode In diagnostic mode the crash reporter will send diagnostic logs to -* the OpenFin reporting service on runtime shutdown -* @property { boolean } isRunning check if it's running -*/ /** * An object representing the core of OpenFin Runtime. Allows the developer * to perform system-level actions, such as accessing logs, viewing processes, diff --git a/types/openfin/_v2/api/system/window.d.ts b/types/openfin/_v2/api/system/window.d.ts index 886084fad6..7b2a3b858b 100644 --- a/types/openfin/_v2/api/system/window.d.ts +++ b/types/openfin/_v2/api/system/window.d.ts @@ -1,14 +1,16 @@ export interface WindowInfo { - uuid: string; - mainWindow: WindowDetail; childWindows: Array; + mainWindow: WindowDetail; + uuid: string; } export interface WindowDetail { - name: string; - top: number; - right: number; bottom: number; height: number; - width: number; + isShowing: boolean; left: number; + name: string; + right: number; + state: string; + top: number; + width: number; } From 42c77469c97668daf3e66d4d3ea8dcf3774485e6 Mon Sep 17 00:00:00 2001 From: licui Date: Tue, 30 Oct 2018 11:13:24 -0400 Subject: [PATCH 0129/1121] remove more shapes from v1 to v2 --- types/openfin/index.d.ts | 48 +++------------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index bc71eeed85..fb9a6fdc1d 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -27,6 +27,7 @@ import { Identity } from './_v2/identity'; import { ShortCutConfig } from './_v2/api/application/application'; import { ExternalApplicationInfo } from './_v2/api/external-application/external-application'; +import { ApplicationInfo } from './_v2/api/system/application'; import { ClearCacheOption } from './_v2/api/system/clearCacheOption'; import { CookieInfo, CookieOption } from './_v2/api/system/cookie'; import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './_v2/api/system/download-asset'; @@ -34,6 +35,7 @@ import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/dow import { EntityInfo } from './_v2/api/system/entity'; import { ProcessInfo } from './_v2/api/system/process'; import { RegistryInfo } from './_v2/api/system/registry-info'; +import { WindowDetail, WindowInfo } from './_v2/api/system/window'; // tslint:disable-next-line:export-just-namespace export = fin; @@ -680,7 +682,7 @@ declare namespace fin { /** * Retrieves an array of data (name, ids, bounds) for all application windows. */ - getAllWindows(callback?: (windowInfoList: WindowDetails[]) => void, errorCallback?: (reason: string) => void): void; + getAllWindows(callback?: (windowInfoList: WindowInfo[]) => void, errorCallback?: (reason: string) => void): void; /** * Returns information about the app asset. */ @@ -830,50 +832,6 @@ declare namespace fin { updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; } - interface ApplicationInfo { - /** - * true when the application is running. - */ - isRunning?: boolean; - /** - * uuid of the application. - */ - uuid?: string; - /** - * uuid of the application that launches this application. - */ - parentUuid?: string; - } - - interface WindowDetails { - uuid?: string; - mainWindow?: WindowInfo; - childWindows?: WindowInfo[]; - } - - interface WindowInfo { - /** - * name of the child window - */ - name?: string; - /** - * top-most coordinate of the child window - */ - top?: number; - /** - * right-most coordinate of the child window - */ - right?: number; - /** - * bottom-most coordinate of the child window - */ - bottom?: number; - /** - * left-most coordinate of the child window - */ - left?: number; - } - interface HostSpecInfo { /** * "x86" for 32-bit or "x86_64" for 64-bit From fbb37f35806bf494708030a4ce5fd1581dbdf029 Mon Sep 17 00:00:00 2001 From: licui Date: Tue, 30 Oct 2018 12:23:26 -0400 Subject: [PATCH 0130/1121] update host specs shape --- types/openfin/_v2/api/system/host-specs.d.ts | 8 ++- types/openfin/_v2/api/system/system.d.ts | 58 +++++++++++++++----- types/openfin/index.d.ts | 58 +------------------- 3 files changed, 52 insertions(+), 72 deletions(-) diff --git a/types/openfin/_v2/api/system/host-specs.d.ts b/types/openfin/_v2/api/system/host-specs.d.ts index 2c5a134aea..dfd3e665fd 100644 --- a/types/openfin/_v2/api/system/host-specs.d.ts +++ b/types/openfin/_v2/api/system/host-specs.d.ts @@ -14,9 +14,11 @@ export interface GpuInfo { name: string; } export interface HostSpecs { - cpu: CpuInfo[]; - memory: number; + aeroGlassEnabled?: boolean; arch: string; - name: string; + cpus: CpuInfo[]; gpu: GpuInfo; + memory: number; + name: string; + screenSaver?: boolean; } diff --git a/types/openfin/_v2/api/system/system.d.ts b/types/openfin/_v2/api/system/system.d.ts index 497bd5f358..aa0467f340 100644 --- a/types/openfin/_v2/api/system/system.d.ts +++ b/types/openfin/_v2/api/system/system.d.ts @@ -65,6 +65,13 @@ import { SystemEvents } from '../events/system'; * @typedef { Object } CookieOption * @property { string } name The name of the cookie */ +/** + * CpuInfo interface + * @typedef { Object } CpuInfo + * @property { string } model The model of the cpu + * @property { number } speed The number in MHz + * @property { Time } times The numbers of milliseconds the CPU has spent in different modes. + */ /** * CrashReporterOption interface * @typedef { Object } CrashReporterOption @@ -107,19 +114,35 @@ import { SystemEvents } from '../events/system'; * @property { string } uuid The uuid of the external connection */ /** -* ExternalProcessRequestType interface -* @typedef { Object } ExternalProcessRequestType -* @property { string } path The file path to where the running application resides -* @property { string } arguments The argument passed to the running application -* @property { Object } listener This is described in the {LaunchExternalProcessListner} type definition -*/ + * ExternalProcessRequestType interface + * @typedef { Object } ExternalProcessRequestType + * @property { string } path The file path to where the running application resides + * @property { string } arguments The argument passed to the running application + * @property { Object } listener This is described in the {LaunchExternalProcessListner} type definition + */ /** -* GetLogRequestType interface -* @typedef { Object } GetLogRequestType -* @property { string } name The name of the running application -* @property { number } endFile The file length of the log file -* @property { number } sizeLimit The set size limit of the log file -*/ + * GetLogRequestType interface + * @typedef { Object } GetLogRequestType + * @property { string } name The name of the running application + * @property { number } endFile The file length of the log file + * @property { number } sizeLimit The set size limit of the log file + */ +/** + * GpuInfo interface + * @typedef { Object } GpuInfo + * @property { string } name The graphics card name + */ +/** + * HostSpecs interface + * @typedef { Object } HostSpecs + * @property { boolean } aeroGlassEnabled Value to check if Aero Glass theme is supported on Windows platforms + * @property { string } arch "x86" for 32-bit or "x86_64" for 64-bit + * @property { Array } cpus The same payload as Node's os.cpus() + * @property { GpuInfo } gpu The graphics card name + * @property { number } memory The same payload as Node's os.totalmem() + * @property { string } name The OS name and version/edition + * @property { boolean } screenSaver Value to check if screensaver is running. Supported on Windows only + */ /** * Identity interface * @typedef { Object } Identity @@ -183,6 +206,15 @@ import { SystemEvents } from '../events/system'; * @property { number } timeout Time out period before the running application terminates * @property { boolean } killtree Value to terminate the running application */ +/** + * Time interface + * @typedef { Object } Time + * @property { number } user The number of milliseconds the CPU has spent in user mode + * @property { number } nice The number of milliseconds the CPU has spent in nice mode + * @property { number } sys The number of milliseconds the CPU has spent in sys mode + * @property { number } idle The number of milliseconds the CPU has spent in idle mode + * @property { number } irq The number of milliseconds the CPU has spent in irq mode + */ /** * WindowDetail interface * @typedef { Object } WindowDetail @@ -372,7 +404,7 @@ export default class System extends EmitterBase { getRvmInfo(): Promise; /** * Retrieves system information. - * @return {Promise.} + * @return {Promise.} * @tutorial System.getHostSpecs */ getHostSpecs(): Promise; diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index fb9a6fdc1d..fbde514cb0 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -33,6 +33,7 @@ import { CookieInfo, CookieOption } from './_v2/api/system/cookie'; import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './_v2/api/system/download-asset'; import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/download-preload'; import { EntityInfo } from './_v2/api/system/entity'; +import { HostSpecs } from './_v2/api/system/host-specs'; import { ProcessInfo } from './_v2/api/system/process'; import { RegistryInfo } from './_v2/api/system/registry-info'; import { WindowDetail, WindowInfo } from './_v2/api/system/window'; @@ -718,7 +719,7 @@ declare namespace fin { /** * Retrieves system information. */ - getHostSpecs(callback?: (info: HostSpecInfo) => void, errorCallback?: (reason: string) => void): void; + getHostSpecs(callback?: (info: HostSpecs) => void, errorCallback?: (reason: string) => void): void; /** * Retrieves the contents of the log with the specified filename. */ @@ -832,61 +833,6 @@ declare namespace fin { updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; } - interface HostSpecInfo { - /** - * "x86" for 32-bit or "x86_64" for 64-bit - */ - arch: string; - /** - * Same payload as Node's os.cpus() - */ - cpus: NodeCpuInfo[]; - gpu: { - /** - * Graphics card name - */ - name: string; - }; - /** - * Same payload as Node's os.totalmem() - */ - memory: number; - /** - * OS name and version/edition - */ - name: string; - } - - interface NodeCpuInfo { - model: string; - /** - * in MHz - */ - speed: number; - times: { - /** - * The number of milliseconds the CPU has spent in user mode. - */ - user: number; - /** - * The number of milliseconds the CPU has spent in nice mode. - */ - nice: number; - /** - * The number of milliseconds the CPU has spent in sys mode. - */ - sys: number; - /** - * The number of milliseconds the CPU has spent in idle mode. - */ - idle: number; - /** - * The number of milliseconds the CPU has spent in irq mode. - */ - irq: number; - }; - } - interface LogInfo { /** * the filename of the log From d90119309c0f1b5ee2dba1545f35c88ed78ce504 Mon Sep 17 00:00:00 2001 From: Mathieu M-Gosselin Date: Tue, 30 Oct 2018 12:22:06 -0400 Subject: [PATCH 0131/1121] [normalize-url] Updated definitions for version 3.3.0 --- types/normalize-url/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/types/normalize-url/index.d.ts b/types/normalize-url/index.d.ts index ec70be130b..fd76c4f72a 100644 --- a/types/normalize-url/index.d.ts +++ b/types/normalize-url/index.d.ts @@ -1,14 +1,20 @@ -// Type definitions for normalize-url 1.9 +// Type definitions for normalize-url 3.3 // Project: https://github.com/sindresorhus/normalize-url // Definitions by: odin3 // BendingBender +// Mathieu M-Gosselin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace normalizeUrl { interface Options { + defaultProtocol?: string; + forceHttp?: boolean; + forceHttps?: boolean; normalizeProtocol?: boolean; normalizeHttps?: boolean; + sortQueryParameters?: boolean; stripFragment?: boolean; + stripHash?: boolean; stripWWW?: boolean; removeQueryParameters?: Array; removeTrailingSlash?: boolean; From 7f4faaf58f7c8008fbd8aaa34edc7abc22e6a94c Mon Sep 17 00:00:00 2001 From: John Stephenson Date: Tue, 30 Oct 2018 16:59:21 +0000 Subject: [PATCH 0132/1121] Added missing getAll() parser function --- types/mathjs/index.d.ts | 1 + types/mathjs/mathjs-tests.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/mathjs/index.d.ts b/types/mathjs/index.d.ts index 71f89b3e1a..2b82c512eb 100644 --- a/types/mathjs/index.d.ts +++ b/types/mathjs/index.d.ts @@ -2876,6 +2876,7 @@ declare namespace math { interface Parser { eval(expr: string): any; get(variable: string): any; + getAll(): { [key: string]: any; }; set: (variable: string, value: any) => void; clear: () => void; } diff --git a/types/mathjs/mathjs-tests.ts b/types/mathjs/mathjs-tests.ts index 7c3dfaec35..1092a68c25 100644 --- a/types/mathjs/mathjs-tests.ts +++ b/types/mathjs/mathjs-tests.ts @@ -179,6 +179,7 @@ Expressions examples const x = parser.get('x'); const f = parser.get('f'); + const y = parser.getAll(); const g = f(3, 3); parser.set('h', 500); From 8c3ffb8ecd348225a00e0ae31a97f3f9f568e96f Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Tue, 30 Oct 2018 18:00:06 +0000 Subject: [PATCH 0133/1121] Implement new 'Command' logic for Editor --- types/slate-react/index.d.ts | 139 +- types/slate-react/slate-react-tests.tsx | 8 +- types/slate/index.d.ts | 1545 ++++++++++++++++------- types/slate/slate-tests.ts | 45 +- 4 files changed, 1147 insertions(+), 590 deletions(-) diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index 31e7b95cbf..c701f6f5e7 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for slate-react 0.18 +// Type definitions for slate-react 0.20 // Project: https://github.com/ianstormtaylor/slate // Definitions by: Andy Kent // Jamie Talbot @@ -6,9 +6,20 @@ // Patrick Sachs // Brandon Shelton // Irwan Fario Subastian +// Sebastian Greaves // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Mark, Node, Change, Schema, Value, Stack, Document } from "slate"; +import { + Document, + Editor as Controller, + Mark, + Node, + Operations, + Schema, + Stack, + Value, + Operation, +} from "slate"; import * as Immutable from "immutable"; import * as React from "react"; @@ -20,7 +31,7 @@ export interface RenderAttributes { export interface RenderMarkProps { attributes: RenderAttributes; children: React.ReactNode; - editor: Editor; + editor: Controller; mark: Mark; marks: Immutable.Set; node: Node; @@ -29,75 +40,54 @@ export interface RenderMarkProps { } export interface RenderNodeProps { - attributes: RenderAttributes; + attributes: object; children: React.ReactNode; - editor: Editor; + editor: Controller; + isFocused: boolean; isSelected: boolean; - key: string; node: Node; parent: Node; + readOnly: boolean; } +export interface RenderPlaceholderProps { + editor: Controller; + readOnly: boolean; +} + +export type EventHook = ( + event: Event, + editor: Controller, + next: () => any +) => any; + export interface Plugin { - onBeforeInput?: ( - event: Event, - change: Change, - editor: Editor - ) => Change | void; - onBlur?: (event: Event, change: Change, editor?: Editor) => Change | void; - onFocus?: (event: Event, change: Change, editor?: Editor) => Change | void; - onClick?: (event: Event, change: Change, editor?: Editor) => Change | void; - onCopy?: (event: Event, change: Change, editor?: Editor) => Change | void; - onCut?: (event: Event, change: Change, editor?: Editor) => Change | void; - onDragEnd?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onDragEnter?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onDragExit?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onDragLeave?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onDragOver?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onDragStart?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onDrop?: (event: Event, change: Change, editor?: Editor) => Change | void; - onInput?: (event: Event, change: Change, editor?: Editor) => Change | void; - onKeyDown?: ( - event: Event, - change: Change, - editor?: Editor - ) => Change | void; - onKeyUp?: (event: Event, change: Change, editor?: Editor) => Change | void; - onPaste?: (event: Event, change: Change, editor?: Editor) => Change | void; - onSelect?: (event: Event, change: Change, editor?: Editor) => Change | void; - onChange?: (change: Change, editor?: Editor) => any; - renderEditor?: (props: RenderAttributes, editor?: Editor) => object | void; - schema?: Schema; - decorateNode?: (node: Node) => Range[] | void; - renderMark?: (props: RenderMarkProps) => any; - renderNode?: (props: RenderNodeProps) => any; - renderPlaceholder?: (props: RenderAttributes) => any; - renderPortal?: (props: RenderAttributes) => any; - validateNode?: (node: Node) => any; + decorateNode?: (node: Node, editor: Controller, next: () => any) => any; + renderEditor?: (props: EditorProps, editor: Controller, next: () => any) => any; + renderMark?: (props: RenderMarkProps, editor: Controller, next: () => any) => any; + renderNode?: (props: RenderNodeProps, editor: Controller, next: () => any) => any; + renderPlaceholder?: (props: RenderPlaceholderProps, editor: Controller, next: () => any) => any; + shouldNodeComponentUpdate?: (previousProps: RenderNodeProps, props: RenderNodeProps, editor: Controller, next: () => any) => any; + + onBeforeInput?: EventHook; + onBlur?: EventHook; + onClick?: EventHook; + onCompositionEnd?: EventHook; + onCompositionStart?: EventHook; + onCopy?: EventHook; + onCut?: EventHook; + onDragEnd?: EventHook; + onDragEnter?: EventHook; + onDragExit?: EventHook; + onDragLeave?: EventHook; + onDragOver?: EventHook; + onDragStart?: EventHook; + onDrop?: EventHook; + onFocus?: EventHook; + onInput?: EventHook; + onKeyDown?: EventHook; + onPaste?: EventHook; + onSelect?: EventHook; } export interface BasicEditorProps { @@ -105,7 +95,7 @@ export interface BasicEditorProps { autoCorrect?: boolean; autoFocus?: boolean; className?: string; - onChange?: (change: Change) => any; + onChange?: (operations: Immutable.List, value: Value) => any; placeholder?: any; plugins?: Plugin[]; readOnly?: boolean; @@ -116,27 +106,34 @@ export interface BasicEditorProps { tabIndex?: number; } -// tsling:disable interface-over-type-literal export type EditorProps = BasicEditorProps & Plugin; export interface EditorState { schema: Schema; value: Value; - stack: Stack; // [TODO] define stack + stack: Stack; } export class Editor extends React.Component { + controller: Controller; schema: Schema; - value: Value; stack: Stack; readonly plugins: Plugin[]; // Instance Methods + applyOperation(...args: any[]): Controller; blur(): void; - change(fn: (change: Change) => any): void; - change(...args: any[]): void; + command(...args: any[]): Controller; focus(): void; + normalize(...args: any[]): Controller; + operations(): Operations; + query(...args: any[]): Controller; + readOnly(): boolean; + resolveController(plugins: Plugin[], schema: Schema, commands: any[], queries: any[]): void; + run(...args: any[]): any; + value(): Value; + withoutNormalizing(...args: any[]): Controller; } export type SlateType = diff --git a/types/slate-react/slate-react-tests.tsx b/types/slate-react/slate-react-tests.tsx index d8c8ea0073..ec46aea800 100644 --- a/types/slate-react/slate-react-tests.tsx +++ b/types/slate-react/slate-react-tests.tsx @@ -1,5 +1,5 @@ import { Editor, Plugin, EditorProps, RenderNodeProps } from "slate-react"; -import { Change, Value } from "slate"; +import { Value } from "slate"; import * as React from "react"; class MyPlugin implements Plugin { @@ -18,10 +18,6 @@ class MyPlugin implements Plugin { } } } - - onChange(change: Change): void { - change.blur(); - } } const myPlugin = new MyPlugin(); @@ -37,11 +33,9 @@ class MyEditor extends React.Component { value: Value.create() }; } - render() { return ; } } diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 8f80ba4615..aae337ed04 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -42,7 +42,7 @@ export interface Rules { max?: number; match?: ObjectAndType | ObjectAndType[]; }>; - normalize?: (change: Change, error: SlateError) => void; + normalize?: (editor: Editor, error: SlateError) => void; parent?: ObjectAndType | ObjectAndType[]; text?: RegExp; } @@ -145,7 +145,6 @@ export class Value extends Immutable.Record({}) { static fromJS(properties: ValueJSON): Value; static isValue(maybeValue: any): maybeValue is Value; - change(): Change; toJSON(): ValueJSON; addMark(path: Path, offset: number, length: number, mark: Mark): Value; insertNode(path: Path, node: Node): Value; @@ -578,487 +577,6 @@ export class Mark extends Immutable.Record({}) { toJSON(): MarkProperties; } -export interface ChangeOption { - normalize?: boolean; -} - -export class Change extends Immutable.Record({}) { - object: "change"; - value: Value; - operations: Immutable.List; - - call(customChange: (change: Change, ...args: any[]) => Change): Change; - - applyOperations(operations: Operation[]): Change; - applyOperation(operation: Operation): Change; - - withoutNormalization(fn: (change: Change) => void): Change; - setOperationFlag(key: string, value: any): Change; - getFlag(key: string, options?: object): any; - unsetOperationFlag(key: string): Change; - - // Full Value Change - setValue(properties: Value | ValueProperties): Change; - - // Current Value Changes - deleteBackward(n: number): Change; - deleteForward(n: number): Change; - delete(): Change; - insertBlock(block: Block | BlockProperties | string): Change; - insertFragment(fragment: Document): Change; - insertInline(inline: Inline | InlineProperties): Change; - insertText(text: string): Change; - addMark(mark: Mark | MarkProperties | string): Change; - setBlocks(properties: BlockProperties | string): Change; - setInlines(properties: InlineProperties | string): Change; - splitBlock(depth: number): Change; - splitInline(depth: number): Change; - removeMark(mark: Mark | MarkProperties | string): Change; - replaceMark( - mark: Mark | MarkProperties | string, - newMark: Mark | MarkProperties | string - ): Change; - toggleMark(mark: Mark | MarkProperties | string): Change; - unwrapBlock(properties: BlockProperties | string): Change; - unwrapInline(properties: InlineProperties | string): Change; - wrapBlock(properties: BlockProperties | string): Change; - wrapInline(properties: InlineProperties | string): Change; - wrapText(prefix: string, suffix?: string): Change; - - // Selection Changes - blur(): Change; - - flip(): Change; - focus(): Change; - move(n: number): Change; - - moveAnchorBackward(n?: number): Change; - moveAnchorForward(n?: number): Change; - moveAnchorTo(path: Path, offset: number): Change; - moveAnchorToEndOfBlock(): Change; - moveAnchorToEndOfInline(): Change; - moveAnchorToEndOfDocument(): Change; - moveAnchorToEndOfNextBlock(): Change; - moveAnchorToEndOfNextInline(): Change; - moveAnchorToEndOfNextText(): Change; - moveAnchorEndOfNode(node: Node): Change; - moveAnchorToEndOfPreviousBlock(): Change; - moveAnchorToEndOfPreviousInline(): Change; - moveAnchorToEndOfPreviousText(): Change; - moveAnchorToEndOfText(): Change; - moveAnchorToStartOfBlock(): Change; - moveAnchorToStartOfDocument(): Change; - moveAnchorToStartOfInline(): Change; - moveAnchorToStartOfNextBlock(): Change; - moveAnchorToStartOfNextInline(): Change; - moveAnchorToStartOfNextText(): Change; - moveAnchorToStartOfNode(node: Node): Change; - moveAnchorToStartOfPreviousBlock(): Change; - moveAnchorToStartOfPreviousInline(): Change; - moveAnchorToStartOfPreviousText(): Change; - moveAnchorToStartOfText(): Change; - - moveBackward(point: Point, n?: number): Change; - moveEndBackward(point: Point, n?: number): Change; - moveEndForward(point: Point, n?: number): Change; - - moveEndTo(path: Path, offset: number): Change; - moveEndToEndOfBlock(): Change; - moveEndToEndOfDocument(): Change; - moveEndToEndOfInline(): Change; - moveEndToEndOfNextBlock(): Change; - moveEndToEndOfNextInline(): Change; - moveEndToEndOfNextText(): Change; - moveEndToEndOfNode(node: Node): Change; - moveEndToEndOfPreviousBlock(): Change; - moveEndToEndOfPreviousInline(): Change; - moveEndToEndOfPreviousText(): Change; - moveEndToEndOfText(): Change; - moveEndToStartOfBlock(): Change; - moveEndToStartOfDocument(): Change; - moveEndToStartOfInline(): Change; - moveEndToStartOfNextBlock(): Change; - moveEndToStartOfNextInline(): Change; - moveEndToStartOfNextText(): Change; - moveEndToStartOfNode(node: Node): Change; - moveEndToStartOfPreviousBlock(): Change; - moveEndToStartOfPreviousInline(): Change; - moveEndToStartOfPreviousText(): Change; - moveEndToStartOfText(): Change; - - moveFocusBackward(n?: number): Change; - moveFocusForward(n?: number): Change; - moveFocusTo(point: Point, n?: number): Change; - moveFocusToEndOfBlock(): Change; - moveFocusToEndOfDocument(): Change; - moveFocusToEndOfInline(): Change; - moveFocusToEndOfNextBlock(): Change; - moveFocusToEndOfNextInline(): Change; - moveFocusToEndOfNextText(): Change; - moveFocusToEndOfNode(node: Node): Change; - moveFocusToEndOfPreviousBlock(): Change; - moveFocusToEndOfPreviousInline(): Change; - moveFocusToEndOfPreviousText(): Change; - moveFocusToEndOfText(): Change; - moveFocusToStartOfBlock(): Change; - moveFocusToStartOfDocument(): Change; - moveFocusToStartOfInline(): Change; - moveFocusToStartOfNextBlock(): Change; - moveFocusToStartOfNextInline(): Change; - moveFocusToStartOfNextText(): Change; - moveFocusToStartOfNode(node: Node): Change; - moveFocusToStartOfPreviousBlock(): Change; - moveFocusToStartOfPreviousInline(): Change; - moveFocusToStartOfPreviousText(): Change; - moveFocusToStartOfText(): Change; - - moveForward(point: Point, n?: number): Change; - - moveStartForward(point: Point, n?: number): Change; - moveStartBackward(point: Point, n?: number): Change; - moveStartTo(point: Point, n?: number): Change; - moveStartToEndOfBlock(): Change; - moveStartToEndOfDocument(): Change; - moveStartToEndOfInline(): Change; - moveStartToEndOfNextBlock(): Change; - moveStartToEndOfNextInline(): Change; - moveStartToEndOfNextText(): Change; - moveStartToEndOfNode(node: Node): Change; - moveStartToEndOfPreviousBlock(): Change; - moveStartToEndOfPreviousInline(): Change; - moveStartToEndOfPreviousText(): Change; - moveStartToEndOfText(): Change; - moveStartToStartOfBlock(): Change; - moveStartToStartOfDocument(): Change; - moveStartToStartOfInline(): Change; - moveStartToStartOfNextBlock(): Change; - moveStartToStartOfNextInline(): Change; - moveStartToStartOfNextText(): Change; - moveStartToStartOfNode(node: Node): Change; - moveStartToStartOfPreviousBlock(): Change; - moveStartToStartOfPreviousInline(): Change; - moveStartToStartOfPreviousText(): Change; - moveStartToStartOfText(): Change; - - moveTo(path: Path, offset: number): Change; - moveToAnchor(): Change; - moveToFocus(): Change; - moveToStart(): Change; - moveToEnd(): Change; - moveToEndOfBlock(): Change; - moveToEndOfDocument(): Change; - moveToEndOfInline(): Change; - moveToEndOfNextBlock(): Change; - moveToEndOfNextInline(): Change; - moveToEndOfNextText(): Change; - moveToEndOfNode(node: Node): Change; - moveToEndOfPreviousBlock(): Change; - moveToEndOfPreviousInline(): Change; - moveToEndOfPreviousText(): Change; - moveToEndOfText(): Change; - moveToStartOfBlock(): Change; - moveToStartOfDocument(): Change; - moveToStartOfInline(): Change; - moveToStartOfNextBlock(): Change; - moveToStartOfNextInline(): Change; - moveToStartOfNextText(): Change; - moveToStartOfNode(node: Node): Change; - moveToStartOfPreviousBlock(): Change; - moveToStartOfPreviousInline(): Change; - moveToStartOfPreviousText(): Change; - moveToStartOfText(): Change; - - moveToRangeOfDocument(): Change; - moveToRangeOfNode(node: Node): Change; - select(properties: Range | RangeProperties, options: ChangeOption): Change; - setAnchor(point: Point): Change; - setEnd(point: Point): Change; - setFocus(point: Point): Change; - setStart(point: Point): Change; - snapshotSelection(): Change; - deselect(): Change; - - // Document Changes - deleteCharBackwardAtRange(range: Range, options?: ChangeOption): Change; - deleteLineBackwardAtRange(range: Range, options?: ChangeOption): Change; - deleteWordBackwardAtRange(range: Range, options?: ChangeOption): Change; - deleteBackwardAtRange(range: Range, options?: ChangeOption): Change; - deleteCharForwardAtRange(range: Range, options?: ChangeOption): Change; - deleteLineForwardAtRange(range: Range, options?: ChangeOption): Change; - deleteWordForwardAtRange(range: Range, options?: ChangeOption): Change; - deleteForwardAtRange(range: Range, options?: ChangeOption): Change; - deleteAtRange(range: Range, options?: ChangeOption): Change; - insertBlockAtRange( - range: Range, - block: Block | BlockProperties | string, - options?: ChangeOption - ): Change; - insertFragmentAtRange( - range: Range, - fragment: Document, - options?: ChangeOption - ): Change; - insertInlineAtRange( - range: Range, - inline: Inline | InlineProperties, - options?: ChangeOption - ): Change; - insertTextAtRange( - range: Range, - text: string, - marks?: Immutable.Set, - options?: ChangeOption - ): Change; - addMarkAtRange( - range: Range, - mark: Mark | MarkProperties | string, - options?: ChangeOption - ): Change; - addMarksAtRange( - range: Range, - marks: Mark[] | MarkProperties[] | string[], - options?: ChangeOption - ): Change; - setBlocksAtRange( - range: Range, - properties: BlockProperties | string, - options?: ChangeOption - ): Change; - setInlinesAtRange( - range: Range, - properties: InlineProperties | string, - options?: ChangeOption - ): Change; - splitBlockAtRange( - range: Range, - depth: number, - height?: number, - options?: ChangeOption - ): Change; - splitInlineAtRange( - range: Range, - depth: number, - height?: number, - options?: ChangeOption - ): Change; - removeMarkAtRange( - range: Range, - mark: Mark | MarkProperties | string, - options?: ChangeOption - ): Change; - toggleMarkAtRange( - range: Range, - mark: Mark | MarkProperties | string, - options?: ChangeOption - ): Change; - unwrapBlockAtRange( - range: Range, - properties: BlockProperties | string, - options?: ChangeOption - ): Change; - unwrapInlineAtRange( - range: Range, - properties: InlineProperties | string, - options?: ChangeOption - ): Change; - wrapBlockAtRange( - range: Range, - properties: BlockProperties | string, - options?: ChangeOption - ): Change; - wrapInlineAtRange( - range: Range, - properties: InlineProperties | string, - options?: ChangeOption - ): Change; - wrapTextAtRange( - range: Range, - prefix: string, - suffix?: string, - options?: ChangeOption - ): Change; - - // Node Changes - addMarkByKey( - key: string, - offset: number, - length: number, - mark: Mark - ): Change; - insertNodeByKey(key: string, index: number, node: Node): Change; - insertFragmentByKey(key: string, index: number, fragment: Document): Change; - insertTextByKey( - key: string, - offset: number, - text: string, - marks?: Immutable.Set | Mark[] - ): Change; - moveNodeByKey(key: string, newKey: string, newIndex: number): Change; - removeMarkByKey( - key: string, - offset: number, - length: number, - mark: Mark - ): Change; - removeNodeByKey(key: string): Change; - replaceNodeByKey(key: string, node: Node): Change; - removeTextByKey(key: string, offset: number, length: number): Change; - setMarkByKey( - key: string, - offset: number, - length: number, - mark: Mark, - properties: MarkProperties - ): Change; - setNodeByKey( - key: string, - properties: BlockProperties | InlineProperties | string - ): Change; - splitNodeByKey(key: string, offset: number): Change; - unwrapInlineByKey( - key: string, - properties: InlineProperties | string - ): Change; - unwrapBlockByKey(key: string, properties: BlockProperties | string): Change; - unwrapNodeByKey(key: string): Change; - wrapInlineByKey(key: string, properties: InlineProperties | string): Change; - wrapBlockByKey(key: string, properties: BlockProperties | string): Change; - wrapNodeByKey(key: string): Change; - - // by path - addMarkByPath( - path: Path, - offset: number, - length: number, - mark: MarkProperties | Mark | string, - options: ChangeOption - ): Change; - insertFragmentByPath( - path: Path, - index: number, - fragment: Document, - options: ChangeOption - ): Change; - insertNodeByPath( - path: Path, - index: number, - node: Node, - options: ChangeOption - ): Change; - insertTextByPath( - path: Path, - offset: number, - text: string, - marks: Immutable.Set | null | undefined, - options: ChangeOption - ): Change; - mergeNodeByPath(path: Path, options: ChangeOption): Change; - mergeNodeByKey(key: string, options: ChangeOption): Change; - moveNodeByPath( - path: Path, - newPath: Path, - newIndex: number, - options: ChangeOption - ): Change; - removeMarkByPath( - path: Path, - offset: number, - length: number, - mark: MarkProperties | Mark | string, - options: ChangeOption - ): Change; - removeAllMarksByPath(path: Path, options: ChangeOption): Change; - removeAllMarksByKey(key: string, options: ChangeOption): Change; - removeNodeByPath(path: Path, options: ChangeOption): Change; - removeTextByPath( - path: Path, - offset: number, - length: number, - options: ChangeOption - ): Change; - replaceNodeByPath(path: Path, newNode: Node, options: ChangeOption): Change; - replaceTextByPath( - path: Path, - offset: number, - length: number, - text: string, - marks: Immutable.Set | null | undefined, - options: ChangeOption - ): Change; - replaceTextByKey( - key: string, - offset: number, - length: number, - text: string, - marks: Immutable.Set | null | undefined, - options: ChangeOption - ): Change; - setMarksByPath( - path: Path, - offset: number, - length: number, - mark: Mark, - properties: MarkProperties, - options: ChangeOption - ): Change; - setNodeByPath( - path: Path, - properties: NodeProperties, - options: ChangeOption - ): Change; - setTextByPath( - path: Path, - text: string, - marks: Immutable.Set | null | undefined, - options: ChangeOption - ): Change; - setTextByKey( - key: string, - text: string, - marks: Immutable.Set | null | undefined, - options: ChangeOption - ): Change; - splitNodeByPath( - path: Path, - position: number, - options?: ChangeOption - ): Change; - splitDescendantByPath( - path: Path, - textPath: Path, - textOffset: number, - options: ChangeOption - ): Change; - unwrapInlineByPath( - path: Path, - properties: InlineProperties, - options: ChangeOption - ): Change; - unwrapBlockByPath( - path: Path, - properties: BlockProperties, - options: ChangeOption - ): Change; - unwrapNodeByPath(path: Path, options: ChangeOption): Change; - wrapBlockByPath(path: Path, block: Block, options: ChangeOption): Change; - wrapInlineByPath(path: Path, inline: Inline, options: ChangeOption): Change; - wrapNodeByPath(path: Path, node: Node): Change; - - normalize(options: ChangeOption): Change; - normalizeDocument(options: ChangeOption): Change; - normalizeNodeByKey(key: string, options: ChangeOption): Change; - normalizeAncestorsByKey(key: string): Change; - normalizeParentByKey(key: string, options: ChangeOption): Change; - normalizeNodeByPath(path: Path, options: ChangeOption): Change; - normalizeParentByPath(path: Path, options: ChangeOption): Change; - normalizeNodeAndChildren(node: Node, schema: Schema): Change; - normalizeNode(node: Node, schema: Schema): Change; - - // History Changes - redo(): Change; - undo(): Change; -} - export interface SelectionProperties { anchor?: Point; focus?: Point; @@ -1530,7 +1048,7 @@ export interface PathUtils { } export interface EditorProperties { - onChange?: (change: Change) => void; + onChange?: (value: Value) => void; plugins?: any[]; readOnly?: boolean; value?: Value; @@ -1538,21 +1056,1074 @@ export interface EditorProperties { export class Editor { object: "editor"; - onChange: (change: Change) => void; + onChange: (value: Value) => void; plugins: any[]; readOnly: boolean; value: Value; constructor(attributes: EditorProperties) - change(customChange: (change: Change, ...args: any[]) => Change): void; + /** + * Apply an `operation` to the editor, updating its value. + */ + applyOperation(operation: Operation): Editor; + + /** + * Synchronously flush the current changes to editor, calling onChange. + * In normal operation you never need to use this method! Reserved for testing. + */ + flush(): Editor; + command(name: string, ...args: any[]): void; event(handler: string, event: Event | SyntheticEvent): void; query(query: string, ...args: any[]): any; + + /** + * Add a new command by type with the editor. This will make the command available as a top-level method on the editor + */ registerCommand(command: string): void; + + /** + * Add a new query by type with the editor. This will make the query available as a top-level method on the editor. + */ registerQuery(query: string): void; + + /** + * Run the middleware stack by key with args, returning its result. + * In normal operation you never need to use this method! Reserved for testing. + */ run(key: string, ...args: any[]): any; setReadOnly(readOnly: boolean): Editor; - setValue(value: Value, options?: object): Editor; + + /** + * Set the editor's value state. + * You can optionally provide a normalize option to either for the editor to completely re-normalize the new value based on its schema or not. + * By default, the editor will re-normalize only if the value is not equal to its previously seen value (which it knows was normalized). + */ + setValue(value: Value, options?: { normalize: () => void }): Editor; + + // Built in Command Operations // + // Current Selection Commands // + /** + * Add a mark to the characters in the current selection + */ + addMark(mark: Mark | MarkProperties | string): Editor; + + /** + * Delete everything in the current selection. + */ + delete(): Editor; + + /** + * Delete backward n characters at the current cursor. + * If the selection is expanded, behaviour is equivalent to delete() + */ + deleteBackward(n: number): Editor; + + /** + * Delete backward n characters at the current cursor. + * If the selection is expanded, behaviour is equivalent to delete() + */ + deleteForward(n: number): Editor; + + /** + * Insert a new block at the same level as the current block, splitting the current block to make room if it is non-empty. + * If the selection is expanded, it will be deleted first. + */ + insertBlock(block: Block | BlockProperties | string): Editor; + + /** + * Insert a document fragment at the current selection. If the selection is expanded, it will be deleted first. + */ + insertFragment(fragment: Document): Editor; + + /** + * Insert a new inline at the current cursor position, splitting the text to make room if it is non-empty. + * If the selection is expanded, it will be deleted first. + */ + insertInline(inline: Inline | InlineProperties): Editor; + + /** + * Insert a string of text at the current selection. If the selection is expanded, it will be deleted first + */ + insertText(text: string): Editor; + + /** + * Set the properties of the Blocks in the current selection. + * Passing a string will set the blocks' type only. + */ + setBlocks(properties: BlockProperties | string): Editor; + + /** + * Set the properties of the Inlines nodes in the current selection. + * Passing a string will set the nodes' type only. + */ + setInlines(properties: InlineProperties | string): Editor; + + /** + * Split the Block in the current selection by depth levels. + * If the selection is expanded, it will be deleted first. + */ + splitBlock(depth: number): Editor; + + /** + * Split the Inline node in the current selection by depth levels. + * If the selection is expanded, it will be deleted first + */ + splitInline(depth: number): Editor; + + /** + * Remove a mark from the characters in the current selection. + * Passing a string will implicitly create a Mark of that type for removal. + */ + removeMark(mark: Mark | MarkProperties | string): Editor; + + /** + * Remove a mark from the characters in the current selection. + * Passing a string will implicitly create a Mark of that type. + */ + replaceMark( + mark: Mark | MarkProperties | string, + newMark: Mark | MarkProperties | string + ): Editor; + + /** + * Add or remove a mark from the characters in the current selection, depending on it already exists on any or not. + * Passing a string will implicitly create a Mark of that type to toggle. + */ + toggleMark(mark: Mark | MarkProperties | string): Editor; + + /** + * Unwrap all Block nodes in the current selection that match a type and/or data + */ + unwrapBlock(properties: BlockProperties | string): Editor; + + /** + * Unwrap all Inline nodes in the current selection that match a type and/or data + */ + unwrapInline(properties: InlineProperties | string): Editor; + + /** + * Wrap the Block nodes in the current selection with a new Block + */ + wrapBlock(properties: BlockProperties | string): Editor; + + /** + * Wrap the Block nodes in the current selection with a new Inline + */ + wrapInline(properties: InlineProperties | string): Editor; + + /** + * Surround the text in the current selection with prefix and suffix strings. + * If the suffix is ommitted, the prefix will be used instead. + */ + wrapText(prefix: string, suffix?: string): Editor; + + // Selection Commands // + /** + * Blur the current selection + */ + blur(): Editor; + + /** + * Unset the selection + */ + deselect(): Editor; + + /** + * Flip the selection + */ + flip(): Editor; + + /** + * Focus the current selection + */ + focus(): Editor; + + /** + * Move the anchor of the current selection backward n characters + */ + moveAnchorBackward(n?: number): Editor; + /** + * Move the anchor of the current selection forward n characters + */ + moveAnchorForward(n?: number): Editor; + /** + * Move the anchor of the current selection to a new path and offset + */ + moveAnchorTo(path: Path, offset: number): Editor; + /** + * Move the anchor of the current selection to the end of the closest block parent. + */ + moveAnchorToEndOfBlock(): Editor; + /** + * Move the anchor of the current selection to the end of the closest inline parent. + */ + moveAnchorToEndOfInline(): Editor; + /** + * Move the anchor of the current selection to the end of the document. + */ + moveAnchorToEndOfDocument(): Editor; + /** + * Move the anchor of the current selection to the end of the next block. + */ + moveAnchorToEndOfNextBlock(): Editor; + /** + * Move the anchor of the current selection to the end of the next inline. + */ + moveAnchorToEndOfNextInline(): Editor; + /** + * Move the anchor of the current selection to the end of the next text. + */ + moveAnchorToEndOfNextText(): Editor; + /** + * Move the anchor of the current selection to the end of the provided node. + */ + moveAnchorEndOfNode(node: Node): Editor; + /** + * Move the anchor of the current selection to the end of the previous block. + */ + moveAnchorToEndOfPreviousBlock(): Editor; + /** + * Move the anchor of the current selection to the end of the previous inline. + */ + moveAnchorToEndOfPreviousInline(): Editor; + /** + * Move the anchor of the current selection to the end of the previous text. + */ + moveAnchorToEndOfPreviousText(): Editor; + /** + * Move the anchor of the current selection to the end of the current text node. + */ + moveAnchorToEndOfText(): Editor; + /** + * Move the anchor of the current selection to the start of the closest block parent. + */ + moveAnchorToStartOfBlock(): Editor; + /** + * Move the anchor of the current selection to the start of the document. + */ + moveAnchorToStartOfDocument(): Editor; + /** + * Move the anchor of the current selection to the start of the closest inline parent. + */ + moveAnchorToStartOfInline(): Editor; + /** + * Move the anchor of the current selection to the start of the next block. + */ + moveAnchorToStartOfNextBlock(): Editor; + /** + * Move the anchor of the current selection to the start of the next inline. + */ + moveAnchorToStartOfNextInline(): Editor; + /** + * Move the anchor of the current selection to the start of the next text node. + */ + moveAnchorToStartOfNextText(): Editor; + /** + * Move the anchor of the current selection to the start of the provided node. + */ + moveAnchorToStartOfNode(node: Node): Editor; + /** + * Move the anchor of the current selection to the start of the previous block. + */ + moveAnchorToStartOfPreviousBlock(): Editor; + /** + * Move the anchor of the current selection to the start of the previous inline. + */ + moveAnchorToStartOfPreviousInline(): Editor; + /** + * Move the anchor of the current selection to the start of the previous text node. + */ + moveAnchorToStartOfPreviousText(): Editor; + /** + * Move the anchor of the current selection to the start of the current text node. + */ + moveAnchorToStartOfText(): Editor; + + /** + * Move the end of the selection backward n characters + */ + moveEndBackward(n?: number): Editor; + /** + * Move the end of the selection foward n characters + */ + moveEndForward(n?: number): Editor; + + /** + * Move the end of the selection to a new path and offset + */ + moveEndTo(path: Path, offset: number): Editor; + /** + * Move the end of the current selection to the end of the closest block parent. + */ + moveEndToEndOfBlock(): Editor; + /** + * Move the end of the current selection to the end of the document. + */ + moveEndToEndOfDocument(): Editor; + /** + * Move the end of the current selection to the end of the closest inline parent. + */ + moveEndToEndOfInline(): Editor; + /** + * Move the anchor of the current selection to the end of the next block. + */ + moveEndToEndOfNextBlock(): Editor; + /** + * Move the end of the current selection to the end of the next inline. + */ + moveEndToEndOfNextInline(): Editor; + /** + * Move the end of the current selection to the end of the next text. + */ + moveEndToEndOfNextText(): Editor; + /** + * Move the end of the current selection to the end of the provided node. + */ + moveEndToEndOfNode(node: Node): Editor; + /** + * Move the end of the current selection to the end of the previous block. + */ + moveEndToEndOfPreviousBlock(): Editor; + /** + * Move the end of the current selection to the end of the previous inline. + */ + moveEndToEndOfPreviousInline(): Editor; + /** + * Move the editor of the current selection to the end of the previous text. + */ + moveEndToEndOfPreviousText(): Editor; + /** + * Move the end of the current selection to the end of the current text node. + */ + moveEndToEndOfText(): Editor; + /** + * Move the end of the current selection to the start of the closest block parent. + */ + moveEndToStartOfBlock(): Editor; + /** + * Move the end of the current selection to the start of the document. + */ + moveEndToStartOfDocument(): Editor; + /** + * Move the end of the current selection to the start of the closest inline parent. + */ + moveEndToStartOfInline(): Editor; + /** + * Move the end of the current selection to the start of the next block. + */ + moveEndToStartOfNextBlock(): Editor; + /** + * Move the end of the current selection to the start of the next inline. + */ + moveEndToStartOfNextInline(): Editor; + /** + * Move the end of the current selection to the start of the next text node. + */ + moveEndToStartOfNextText(): Editor; + /** + * Move the end of the current selection to the start of the provided node. + */ + moveEndToStartOfNode(node: Node): Editor; + /** + * Move the end of the current selection to the start of the previous block. + */ + moveEndToStartOfPreviousBlock(): Editor; + /** + * Move the end of the current selection to the start of the previous inline. + */ + moveEndToStartOfPreviousInline(): Editor; + /** + * Move the end of the current selection to the start of the previous text node. + */ + moveEndToStartOfPreviousText(): Editor; + /** + * Move the end of the current selection to the start of the current text node. + */ + moveEndToStartOfText(): Editor; + + /** + * Move the focus of the current selection backward n characters + */ + moveFocusBackward(n?: number): Editor; + /** + * Move the focus of the current selection forward n characters + */ + moveFocusForward(n?: number): Editor; + /** + * Move the focus of the current selection to a new path and offset + */ + moveFocusTo(path: Path, offset: number): Editor; + /** + * Move the focus of the current selection to the end of the closest block parent. + */ + moveFocusToEndOfBlock(): Editor; + /** + * Move the focus of the current selection to the end of the document. + */ + moveFocusToEndOfDocument(): Editor; + /** + * Move the focus of the current selection to the end of the closest inline parent. + */ + moveFocusToEndOfInline(): Editor; + /** + * Move the focus of the current selection to the end of the next block. + */ + moveFocusToEndOfNextBlock(): Editor; + /** + * Move the focus of the current selection to the end of the next inline. + */ + moveFocusToEndOfNextInline(): Editor; + /** + * Move the focus of the current selection to the end of the next text. + */ + moveFocusToEndOfNextText(): Editor; + /** + * Move the focus of the current selection to the end of the provided node. + */ + moveFocusToEndOfNode(node: Node): Editor; + /** + * Move the focus of the current selection to the end of the previous block. + */ + moveFocusToEndOfPreviousBlock(): Editor; + /** + * Move the focus of the current selection to the end of the previous inline. + */ + moveFocusToEndOfPreviousInline(): Editor; + /** + * Move the focus of the current selection to the end of the previous text. + */ + moveFocusToEndOfPreviousText(): Editor; + /** + * Move the focus of the current selection to the end of the current text node. + */ + moveFocusToEndOfText(): Editor; + /** + * Move the focus of the current selection to the start of the closest block parent. + */ + moveFocusToStartOfBlock(): Editor; + /** + * Move the focus of the current selection to the start of the document. + */ + moveFocusToStartOfDocument(): Editor; + /** + * Move the focus of the current selection to the start of the closest inline parent. + */ + moveFocusToStartOfInline(): Editor; + /** + * Move the focus of the current selection to the start of the next block. + */ + moveFocusToStartOfNextBlock(): Editor; + /** + * Move the focus of the current selection to the start of the next inline. + */ + moveFocusToStartOfNextInline(): Editor; + /** + * Move the focus of the current selection to the start of the next text node. + */ + moveFocusToStartOfNextText(): Editor; + /** + * Move the focus of the current selection to the start of the provided node. + */ + moveFocusToStartOfNode(node: Node): Editor; + /** + * Move the focus of the current selection to the start of the previous block. + */ + moveFocusToStartOfPreviousBlock(): Editor; + /** + * Move the focus of the current selection to the start of the previous inline. + */ + moveFocusToStartOfPreviousInline(): Editor; + /** + * Move the focus of the current selection to the start of the previous text node. + */ + moveFocusToStartOfPreviousText(): Editor; + /** + * Move the focus of the current selection to the start of the current text node. + */ + moveFocusToStartOfText(): Editor; + + /** + * Move the start of the current selection backward n characters + */ + moveStartForward(point: Point, n?: number): Editor; + /** + * Move the start of the current selection forward n characters + */ + moveStartBackward(point: Point, n?: number): Editor; + /** + * Move the start of the current selection to a new path and offset + */ + moveStartTo(point: Point, n?: number): Editor; + /** + * Move the start of the current selection to the end of the closest block parent. + */ + moveStartToEndOfBlock(): Editor; + /** + * Move the start of the current selection to the end of the document. + */ + moveStartToEndOfDocument(): Editor; + /** + * Move the start of the current selection to the end of the closest inline parent. + */ + moveStartToEndOfInline(): Editor; + /** + * Move the start of the current selection to the end of the next block. + */ + moveStartToEndOfNextBlock(): Editor; + /** + * Move the start of the current selection to the end of the next inline. + */ + moveStartToEndOfNextInline(): Editor; + /** + * Move the start of the current selection to the end of the next text. + */ + moveStartToEndOfNextText(): Editor; + /** + * Move the start of the current selection to the end of the provided node. + */ + moveStartToEndOfNode(node: Node): Editor; + /** + * Move the start of the current selection to the end of the previous block. + */ + moveStartToEndOfPreviousBlock(): Editor; + /** + * Move the start of the current selection to the end of the previous inline. + */ + moveStartToEndOfPreviousInline(): Editor; + /** + * Move the start of the current selection to the end of the previous text. + */ + moveStartToEndOfPreviousText(): Editor; + /** + * Move the start of the current selection to the end of the current text node. + */ + moveStartToEndOfText(): Editor; + /** + * Move the start of the current selection to the start of the closest block parent. + */ + moveStartToStartOfBlock(): Editor; + /** + * Move the start of the current selection to the start of the document. + */ + moveStartToStartOfDocument(): Editor; + /** + * Move the start of the current selection to the start of the closest inline parent. + */ + moveStartToStartOfInline(): Editor; + /** + * Move the start of the current selection to the start of the next block. + */ + moveStartToStartOfNextBlock(): Editor; + /** + * Move the start of the current selection to the start of the next inline. + */ + moveStartToStartOfNextInline(): Editor; + /** + * Move the start of the current selection to the start of the next text node. + */ + moveStartToStartOfNextText(): Editor; + /** + * Move the start of the current selection to the start of the provided node. + */ + moveStartToStartOfNode(node: Node): Editor; + /** + * Move the start of the current selection to the start of the previous block. + */ + moveStartToStartOfPreviousBlock(): Editor; + /** + * Move the start of the current selection to the start of the previous inline. + */ + moveStartToStartOfPreviousInline(): Editor; + /** + * Move the start of the current selection to the start of the previous text node. + */ + moveStartToStartOfPreviousText(): Editor; + /** + * Move the start of the current selection to the start of the current text node. + */ + moveStartToStartOfText(): Editor; + + /** + * Move the anchor and focus of the selection backward n characters. + */ + moveBackward(n?: number): Editor; + /** + * Move the anchor and focus of the selection forward n characters. + */ + moveForward(n?: number): Editor; + /** + * Collapse the current selection at the provided new path and offset. + */ + moveTo(path: Path, offset: number): Editor; + /** + * Collapse the current selection at the anchor. + */ + moveToAnchor(): Editor; + /** + * Collapse the current selection at the focus. + */ + moveToFocus(): Editor; + /** + * Collapse the current selection at the start. + */ + moveToStart(): Editor; + /** + * Collapse the current selection at the end. + */ + moveToEnd(): Editor; + /** + * Collapse the current selection at the end of the closest block parent. + */ + moveToEndOfBlock(): Editor; + /** + * Collapse the current selection at the end of the document. + */ + moveToEndOfDocument(): Editor; + /** + * Collapse the current selection at the end of the closest inline parent. + */ + moveToEndOfInline(): Editor; + /** + * Collapse the current selection at the end of the next block. + */ + moveToEndOfNextBlock(): Editor; + /** + * Collapse the current selection at the end of the inline. + */ + moveToEndOfNextInline(): Editor; + /** + * Collapse the current selection at the end of the next text node. + */ + moveToEndOfNextText(): Editor; + /** + * Collapse the current selection at the end of the provided node. + */ + moveToEndOfNode(node: Node): Editor; + /** + * Collapse the current selection at the end of the previous block. + */ + moveToEndOfPreviousBlock(): Editor; + /** + * Collapse the current selection at the end of the previous inline. + */ + moveToEndOfPreviousInline(): Editor; + /** + * Collapse the current selection at the end of the previous text node. + */ + moveToEndOfPreviousText(): Editor; + /** + * Collapse the current selection at the end of the current text node. + */ + moveToEndOfText(): Editor; + /** + * Collapse the current selection at the start of the nearest block parent. + */ + moveToStartOfBlock(): Editor; + /** + * Collapse the current selection at the start of the document. + */ + moveToStartOfDocument(): Editor; + /** + * Collapse the current selection at the start of the nearest inline parent. + */ + moveToStartOfInline(): Editor; + /** + * Collapse the current selection at the start of the next block. + */ + moveToStartOfNextBlock(): Editor; + /** + * Collapse the current selection at the start of the next inline. + */ + moveToStartOfNextInline(): Editor; + /** + * Collapse the current selection at the start of the next text node. + */ + moveToStartOfNextText(): Editor; + /** + * Collapse the current selection at the start of the provided node. + */ + moveToStartOfNode(node: Node): Editor; + /** + * Collapse the current selection at the start of the previous block. + */ + moveToStartOfPreviousBlock(): Editor; + /** + * Collapse the current selection at the start of the previous inline. + */ + moveToStartOfPreviousInline(): Editor; + /** + * Collapse the current selection at the start of the previous text node. + */ + moveToStartOfPreviousText(): Editor; + /** + * Collapse the current selection at the start of the current text node. + */ + moveToStartOfText(): Editor; + + /** + * Move the current selection's anchor to the start of the document and its focus to the end of it, selecting everything. + */ + moveToRangeOfDocument(): Editor; + /** + * Move the current selection's anchor to the start of the provided node and its focus to the end of it. + */ + moveToRangeOf(node: Node): Editor; + /** + * Merge the current selection with the provided properties + */ + select(properties: Range | RangeProperties): Editor; + + // Document Range Commands // + + /** + * Add a mark to the characters in the range. + * Passing a string as `mark` will implicitly create a mark with that `type` + */ + addMarkAtRange(range: Range, mark: Mark | MarkProperties | string): Editor; + /** + * Delete everything in the range + */ + deleteAtRange(range: Range): Editor; + /** + * Delete backward until the char boundary at a range + */ + deleteCharBackwardAtRange(range: Range): Editor; + /** + * Delete backward until the line boundary at a range + */ + deleteLineBackwardAtRange(range: Range): Editor; + /** + * Delete backward until the word boundary at a range + */ + deleteWordBackwardAtRange(range: Range): Editor; + /** + * Delete backward n characters at a range + */ + deleteBackwardAtRange(range: Range, n: number): Editor; + /** + * Delete forward until the char boundary at a range + */ + deleteCharForwardAtRange(range: Range): Editor; + /** + * Delete forward until the line boundary at a range + */ + deleteLineForwardAtRange(range: Range): Editor; + /** + * Delete forward until the word boundary at a range + */ + deleteWordForwardAtRange(range: Range): Editor; + /** + * Delete forward n characters at a range + */ + deleteForwardAtRange(range: Range, n: number): Editor; + + /** + * Insert a block node at range, splitting text to make room if it is non-empty. + * If the range is expanded, it will be deleted first. + */ + insertBlockAtRange(range: Range, block: Block | BlockProperties | string): Editor; + /** + * Insert a document fragment at a range, if the range is expanded, it will be deleted first. + */ + insertFragmentAtRange(range: Range, fragment: Document): Editor; + /** + * Insert a new inline at range, splitting text to make room if it is non-empty. + * If the range is expanded, it will be deleted first. + */ + insertInlineAtRange(range: Range, inline: Inline | InlineProperties): Editor; + /** + * Insert text at range. If the range is expanded it will be deleted first + */ + insertTextAtRange(range: Range, text: string): Editor; + /** + * Set the properties of the block nodes in a range. + * Passing a string will set the nodes' type only + */ + setBlocksAtRange(range: Range, properties: BlockProperties | string): Editor; + /** + * Set the properties of the inline nodes in a range. + * Passing a string will set the nodes' type only + */ + setInlinesAtRange(range: Range, properties: InlineProperties | string): Editor; + /** + * Split the block in a range by depth levels. If the range is expanded it will be deleted first. + */ + splitBlockAtRange(range: Range, depth: number): Editor; + /** + * Split the inline in a range by depth levels. If the range is expanded it will be deleted first. + */ + splitInlineAtRange(range: Range, depth: number): Editor; + /** + * Remove a mark from characters in the range. Passing a string will + * implicitly create a mark of that type for deletion. + */ + removeMarkAtRange(range: Range, mark: Mark | MarkProperties | string): Editor; + /** + * Add or remove a mark from characters in the range. Passing a string will + * implicitly create a mark of that type for deletion. + */ + toggleMarkAtRange(range: Range, mark: Mark | MarkProperties | string): Editor; + /** + * Unwrap all block nodes in a range that match properties + */ + unwrapBlockAtRange(range: Range, properties: BlockProperties | string): Editor; + /** + * Unwrap all inline nodes in a range that match properties + */ + unwrapInlineAtRange(range: Range, properties: InlineProperties | string): Editor; + /** + * wrap all block nodes in a range with a new block node with the provided properties + */ + wrapBlockAtRange(range: Range, properties: BlockProperties | string): Editor; + /** + * wrap all inline nodes in a range with a new inline node with the provided properties + */ + wrapInlineAtRange(range: Range, properties: InlineProperties | string): Editor; + /** + * Surround the text in a range with a prefix and suffix. If the suffix is ommitted, + * the prefix will be used instead. + */ + wrapTextAtRange(range: Range, prefix: string, suffix?: string): Editor; + + // Node commands // + /** + * Add a mark to length characters starting at an offset in a node by key + */ + addMarkByKey( + key: string, + offset: number, + length: number, + mark: Mark + ): Editor; + /** + * Add a mark to length characters starting at an offset in a node by path + */ + addMarkByPath( + path: Path, + offset: number, + length: number, + mark: MarkProperties | Mark | string + ): Editor; + /** + * Insert a node at index inside a parent node by key + */ + insertNodeByKey(key: string, index: number, node: Node): Editor; + /** + * Insert a node at index inside a parent node by apth + */ + insertNodeByPath(path: Path, index: number, node: Node): Editor; + /** + * Insert a document fragment at index inside a parent node by key + */ + insertFragmentByKey(key: string, index: number, fragment: Document): Editor; + /** + * Insert a document fragment at index inside a parent node by path + */ + insertFragmentByPath(path: Path, index: number, fragment: Document): Editor; + /** + * Insert text at an offset in a text node by its key with optional marks + */ + insertTextByKey( + key: string, + offset: number, + text: string, + marks?: Immutable.Set | Mark[] + ): Editor; + /** + * Insert text at an offset in a text node by its path with optional marks + */ + insertTextByPath( + path: Path, + offset: number, + text: string, + marks?: Immutable.Set | Mark[] + ): Editor; + /** + * Merge a node by its key with its previous sibling + */ + mergeNodeByKey(key: string): Editor; + /** + * Merge a node by its path with its previous sibling + */ + mergeNodeByPath(path: Path): Editor; + /** + * Move a node by its key to a new parent node with with newkey at newindex + */ + moveNodeByKey(key: string, newKey: string, newIndex: number): Editor; + /** + * Move a node by its path to a new parent node with with newpath at newindex + */ + moveNodeByPath(path: Path, newPath: Path, newIndex: number): Editor; + /** + * Remove a mark from length characters starting at an offset in a node by key + */ + removeMarkByKey( + key: string, + offset: number, + length: number, + mark: Mark + ): Editor; + /** + * Remove a mark from length characters starting at an offset in a node by path + */ + removeMarkByPath( + path: Path, + offset: number, + length: number, + mark: MarkProperties | Mark | string + ): Editor; + /** + * Remove a node from the document by its key + */ + removeNodeByKey(key: string): Editor; + /** + * Remove a node from the document by its path + */ + removeNodeByPath(path: Path): Editor; + /** + * Replace a node in the document with a new node by key + */ + replaceNodeByKey(key: string, node: Node): Editor; + /** + * Replace a node in the document with a new node by path + */ + replaceNodeByPath(path: Path, newNode: Node): Editor; + /** + * Remove length characters of text starting at an offset in a node by key + */ + removeTextByKey(key: string, offset: number, length: number): Editor; + /** + * Remove length characters of text starting at an offset in a node by path + */ + removeTextByPath(path: Path, offset: number, length: number): Editor; + /** + * Set a dictionary of properties on a mark by its key. + */ + setMarkByKey( + key: string, + offset: number, + length: number, + mark: Mark, + properties: MarkProperties + ): Editor; + /** + * Set a dictionary of properties on a mark by its path. + */ + setMarksByPath( + path: Path, + offset: number, + length: number, + mark: Mark, + properties: MarkProperties + ): Editor; + /** + * Set a dictionary of properties on a node by its key. + */ + setNodeByKey( + key: string, + properties: BlockProperties | InlineProperties | string + ): Editor; + /** + * Set a dictionary of properties on a node by its key. + */ + setNodeByPath(path: Path, properties: NodeProperties): Editor; + /** + * Split a node by its key at an offset + */ + splitNodeByKey(key: string, offset: number): Editor; + /** + * Split a node by its path at an offset + */ + splitNodeByPath(path: Path, position: number): Editor; + /** + * Unwrap all inner content of an inline node by its key that match properties + */ + unwrapInlineByKey(key: string, properties: InlineProperties | string): Editor; + /** + * Unwrap all inner content of an inline node by its path that match properties + */ + unwrapInlineByPath(path: Path, properties: InlineProperties | string): Editor; + /** + * Unwrap all inner content of a block node by its key that match properties + */ + unwrapBlockByKey(key: string, properties: BlockProperties | string): Editor; + /** + * Unwrap all inner content of a block node by its path that match properties + */ + unwrapBlockByPath(path: Path, properties: BlockProperties): Editor; + /** + * Unwrap a single node from its parent. if the node is surrounded with siblings the parent will be split. + * If the node is an only child, it will replace the parent + */ + unwrapNodeByKey(key: string): Editor; + /** + * Unwrap a single node from its parent. if the node is surrounded with siblings the parent will be split. + * If the node is an only child, it will replace the parent + */ + unwrapNodeByPath(path: Path): Editor; + /** + * Wrap the given node by key in an Inline node that matches properties. + */ + wrapInlineByKey(key: string, properties: InlineProperties | string): Editor; + /** + * Wrap the given node by path in an Inline node that matches properties. + */ + wrapInlineByPath(path: Path, properties: InlineProperties | string): Editor; + /** + * Wrap the given node by key in a block node that matches properties. + */ + wrapBlockByKey(key: string, properties: BlockProperties | string): Editor; + /** + * Wrap the given node by path in a block node that matches properties. + */ + wrapBlockByPath(path: Path, block: Block | string): Editor; + /** + * Wrap the node with the specified key with the parent node, this will clear all children of the parent. + */ + wrapNodeByKey(key: string, parent: Node): Editor; + /** + * Wrap the node with the specified key with the parent node, this will clear all children of the parent. + */ + wrapNodeByPath(path: Path, parent: Node): Editor; + + // Miscellaneous Commands // + /** + * Normalizes the document with the value's schema. Run automatically unless manually disabled. + * Use it sparingly and strategically, as it can be very expensive. + */ + normalize(): Editor; + /** + * Calls the provided function with the current editor as the first argument. + * Normalization does not occur while the function is executing and is deferred to execute immediately after completion. + * + * This allows for sequence change operations to not be interrupted by normalization + */ + withoutNormalization(fn: () => void): Editor; + /** + * By default all operations are saved to the editor's history. If you have + * changes that you don't want to show up in history, use this function. + */ + withoutSaving(fn: () => void): Editor; + /** + * Usually all command operations are merged into a single save point in history, + * if more control is desired, create single save points using this function. + */ + withoutMerging(fn: () => void): Editor; + + // History Commands // + /** + * Move forward one step in the history + */ + redo(): Editor; + /** + * Move backward one step in the history + */ + undo(): Editor; + /** + * Snapshot the current selection for undo purposes. + */ + snapshotSelection(): Editor; } export {}; diff --git a/types/slate/slate-tests.ts b/types/slate/slate-tests.ts index 7eb81633bf..4439140bdc 100644 --- a/types/slate/slate-tests.ts +++ b/types/slate/slate-tests.ts @@ -1,28 +1,7 @@ -import { Value, Data, BlockJSON, Document, Editor, Change, KeyUtils } from "slate"; +import { Value, Data, BlockJSON, Document, Editor, KeyUtils } from "slate"; const data = Data.create({ foo: "bar " }); const value = Value.create({ data }); -const change = value - .change() - .focus() - .moveAnchorToStartOfDocument() - .moveFocusToEndOfDocument() - .delete() - .insertText("A bit of rich text, followed by...") - .moveToStartOfText() - .move(10) - .moveFocusForward(4) - .addMark("bold") - .moveToEndOfNextBlock() - .insertBlock({ - type: "image", - data: { - src: "http://placekitten.com/200/300", - alt: "Kittens", - className: "img-responsive" - } - }) - .insertBlock("paragraph"); const node: BlockJSON = { object: "block", @@ -47,9 +26,6 @@ const doc = Document.fromJSON({ }); const editor = new Editor({ value }); -editor.change((change: Change) => { - return change.insertText("test"); -}); editor.registerQuery("testQuery"); editor.registerCommand("testCommand"); @@ -58,6 +34,25 @@ editor.command("testCommand"); editor.query("testQuery"); editor.run("testCommand"); editor.event("mouseDown", new Event("mouseDown")); +editor +.focus() +.moveAnchorToStartOfDocument() +.moveFocusToEndOfDocument() +.delete() +.insertText("A bit of rich text, followed by...") +.moveToStartOfText() +.moveFocusForward(4) +.addMark("bold") +.moveToEndOfNextBlock() +.insertBlock({ + type: "image", + data: { + src: "http://placekitten.com/200/300", + alt: "Kittens", + className: "img-responsive" + } +}) +.insertBlock("paragraph"); KeyUtils.setGenerator(() => "Test"); KeyUtils.create(); From d3175aa9978a8bd3fc93af4d0bdeda9c8600578a Mon Sep 17 00:00:00 2001 From: licui Date: Tue, 30 Oct 2018 14:41:40 -0400 Subject: [PATCH 0134/1121] update LogInfo, ProxyInfo and RVMInfo shapes --- types/openfin/_v2/api/system/proxy.d.ts | 13 ++++---- types/openfin/_v2/api/system/rvm.d.ts | 3 ++ types/openfin/_v2/api/system/system.d.ts | 37 ++++++++++++++++++++-- types/openfin/index.d.ts | 40 +++--------------------- 4 files changed, 48 insertions(+), 45 deletions(-) diff --git a/types/openfin/_v2/api/system/proxy.d.ts b/types/openfin/_v2/api/system/proxy.d.ts index 597afa6548..2f8a945903 100644 --- a/types/openfin/_v2/api/system/proxy.d.ts +++ b/types/openfin/_v2/api/system/proxy.d.ts @@ -1,14 +1,15 @@ export interface ProxyInfo { config: ProxyConfig; - system: { - autoConfigUrl: string; - bypass: ''; - enabled: boolean; - proxy: string; - }; + system: ProxySystemInfo; } export interface ProxyConfig { proxyAddress: string; proxyPort: number; type: string; } +export interface ProxySystemInfo { + autoConfigUrl: string; + bypass: string; + enabled: boolean; + proxy: string; +} diff --git a/types/openfin/_v2/api/system/rvm.d.ts b/types/openfin/_v2/api/system/rvm.d.ts index 42fc0b94db..fb8737a081 100644 --- a/types/openfin/_v2/api/system/rvm.d.ts +++ b/types/openfin/_v2/api/system/rvm.d.ts @@ -1,5 +1,8 @@ export interface RVMInfo { action: string; + appLogDirectory: string; + path: string; 'start-time': string; version: string; + 'working-dir': string; } diff --git a/types/openfin/_v2/api/system/system.d.ts b/types/openfin/_v2/api/system/system.d.ts index aa0467f340..24c6ed7ff7 100644 --- a/types/openfin/_v2/api/system/system.d.ts +++ b/types/openfin/_v2/api/system/system.d.ts @@ -149,6 +149,13 @@ import { SystemEvents } from '../events/system'; * @property { string } name The name of the application * @property { string } uuid The uuid of the application */ +/** + * LogInfo interface + * @typedef { Object } LogInfo + * @property { string } name The filename of the log + * @property { number } size The size of the log in bytes + * @property { string } date The unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)"" + */ /** * @typedef { verbose | info | warning | error | fatal } LogLevel * @summary Log verbosity levels. @@ -180,9 +187,23 @@ import { SystemEvents } from '../events/system'; /** * ProxyConfig interface * @typedef { Object } ProxyConfig - * @property { numder } proxyPort The port number of the running application - * @property { string } proxyAddress The address of the running application - * @property { string } type + * @property { string } proxyAddress The configured proxy address + * @property { numder } proxyPort The configured proxy port + * @property { string } type The proxy Type + */ +/** + * ProxyInfo interface + * @typedef { Object } ProxyInfo + * @property { ProxyConfig } config The proxy config + * @property { ProxySystemInfo } system The proxy system info + */ +/** + * ProxySystemInfo interface + * @typedef { Object } ProxySystemInfo + * @property { string } autoConfigUrl The auto configuration url + * @property { string } bypass The proxy bypass info + * @property { boolean } enabled Value to check if a proxy is enabled + * @property { string } proxy The proxy info */ /** * RegistryInfo interface @@ -199,6 +220,16 @@ import { SystemEvents } from '../events/system'; * @desc These are the options object required by the downloadRuntime function. * @property { string } version The given version to download */ +/** + * RVMInfo interface + * @typedef { Object } RVMInfo + * @property { string } action The name of action: "get-rvm-info" + * @property { string } appLogDirectory The app log directory + * @property { string } path The path of OpenfinRVM.exe + * @property { string } 'start-time' The start time of RVM + * @property { string } version The version of RVM + * @property { string } 'working-dir' The working directory + */ /** * TerminateExternalRequestType interface * @typedef { Object } TerminateExternalRequestType diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index fbde514cb0..7bee14463a 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -34,8 +34,11 @@ import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadP import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/download-preload'; import { EntityInfo } from './_v2/api/system/entity'; import { HostSpecs } from './_v2/api/system/host-specs'; +import { LogInfo } from './_v2/api/system/log'; import { ProcessInfo } from './_v2/api/system/process'; +import { ProxyInfo } from './_v2/api/system/proxy'; import { RegistryInfo } from './_v2/api/system/registry-info'; +import { RVMInfo} from './_v2/api/system/rvm'; import { WindowDetail, WindowInfo } from './_v2/api/system/window'; // tslint:disable-next-line:export-just-namespace @@ -752,7 +755,7 @@ declare namespace fin { /** * Returns information about the running RVM in an object. */ - getRvmInfo(callback?: (rvmInfo: RvmInfo) => void, errorCallback?: (reason: string) => void): void; + getRvmInfo(callback?: (rvmInfo: RVMInfo) => void, errorCallback?: (reason: string) => void): void; /** * Returns the version of the runtime. The version contains the major, minor, build and revision numbers. */ @@ -833,41 +836,6 @@ declare namespace fin { updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; } - interface LogInfo { - /** - * the filename of the log - */ - name?: string; - /** - * the size of the log in bytes - */ - size?: number; - /** - * the unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)" - */ - date?: string; - } - - interface ProxyInfo { - /** - * the configured Proxy Address - */ - proxyAddress?: string; - /** - * the configured Proxy port - */ - proxyPort?: number; - /** - * Proxy Type - */ - type?: string; - } - - interface RvmInfo { - version?: string; - "start-time"?: string; - } - interface ExternalProcessLaunchInfo { path?: string; /** From b7c956ac52d2511b5a6ef42abb9afaf5312eefb2 Mon Sep 17 00:00:00 2001 From: licui Date: Tue, 30 Oct 2018 16:15:57 -0400 Subject: [PATCH 0135/1121] Update tray info, window bounds, monitor and animation shapes from v1 to v2 --- types/openfin/_v2/api/system/system.d.ts | 6 + types/openfin/index.d.ts | 142 ++--------------------- types/openfin/openfin-tests.ts | 4 +- 3 files changed, 17 insertions(+), 135 deletions(-) diff --git a/types/openfin/_v2/api/system/system.d.ts b/types/openfin/_v2/api/system/system.d.ts index 24c6ed7ff7..88a37d0b26 100644 --- a/types/openfin/_v2/api/system/system.d.ts +++ b/types/openfin/_v2/api/system/system.d.ts @@ -167,6 +167,12 @@ import { SystemEvents } from '../events/system'; * @property { string } error error and above * @property { string } fatal fatal only, indicates a crash is imminent */ +/** + * PointTopLeft interface + * @typedef { Object } PointTopLeft + * @property { number } top The mouse top position in virtual screen coordinates + * @property { number } left The mouse left position in virtual screen coordinates + */ /** * ProcessInfo interface * @typedef { Object } ProcessInfo diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index 7bee14463a..139c874cab 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -25,7 +25,7 @@ * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "documennt" objects. */ import { Identity } from './_v2/identity'; -import { ShortCutConfig } from './_v2/api/application/application'; +import { ShortCutConfig, TrayInfo } from './_v2/api/application/application'; import { ExternalApplicationInfo } from './_v2/api/external-application/external-application'; import { ApplicationInfo } from './_v2/api/system/application'; import { ClearCacheOption } from './_v2/api/system/clearCacheOption'; @@ -35,11 +35,15 @@ import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/dow import { EntityInfo } from './_v2/api/system/entity'; import { HostSpecs } from './_v2/api/system/host-specs'; import { LogInfo } from './_v2/api/system/log'; +import { MonitorInfo } from './_v2/api/system/monitor'; +import { PointTopLeft } from './_v2/api/system/point'; import { ProcessInfo } from './_v2/api/system/process'; import { ProxyInfo } from './_v2/api/system/proxy'; import { RegistryInfo } from './_v2/api/system/registry-info'; import { RVMInfo} from './_v2/api/system/rvm'; import { WindowDetail, WindowInfo } from './_v2/api/system/window'; +import Bounds from './_v2/api/window/bounds'; +import { Transition, TransitionOptions } from './_v2/api/window/transition'; // tslint:disable-next-line:export-just-namespace export = fin; @@ -146,7 +150,7 @@ declare namespace fin { /** * Retrieves information about the system tray. */ - getTrayIconInfo(callback?: (trayInfo: TrayIconInfo) => void, errorCallback?: (reason: string) => void): void; + getTrayIconInfo(callback?: (trayInfo: TrayInfo) => void, errorCallback?: (reason: string) => void): void; /** * Determines if the application is currently running. */ @@ -742,7 +746,7 @@ declare namespace fin { /** * Returns the mouse in virtual screen coordinates (left, top). */ - getMousePosition(callback?: (mousePosition: VirtualScreenCoordinates) => void, errorCallback?: (reason: string) => void): void; + getMousePosition(callback?: (mousePosition: PointTopLeft) => void, errorCallback?: (reason: string) => void): void; /** * Retrieves an array of all of the runtime processes that are currently running. * Each element in the array is an object containing the uuid and the name of the application to which the process belongs. @@ -989,7 +993,7 @@ declare namespace fin { /** * Performs the specified window transitions */ - animate(transitions: AnimationTransition, options: AnimationOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; + animate(transitions: Transition, options: TransitionOptions, callback?: (event: any) => void, errorCallback?: (reason: string) => void): void; /** * Provides credentials to authentication requests */ @@ -1034,7 +1038,7 @@ declare namespace fin { /** * Gets the current bounds (top, left, width, height) of the window. */ - getBounds(callback?: (bounds: WindowBounds) => void, errorCallback?: (reason: string) => void): void; + getBounds(callback?: (bounds: Bounds) => void, errorCallback?: (reason: string) => void): void; /** * Retrieves an array containing wrapped fin.desktop.Windows that are grouped with this window. If a window is not in a group an empty array is returned. * Please note that calling window is included in the result array. @@ -1216,51 +1220,6 @@ declare namespace fin { type: "monitor-info-changed"; } - interface MonitorInfo { - nonPrimaryMonitors: MonitorInfoDetail[]; - primaryMonitor: MonitorInfoDetail; - reason: string; - taskbar: { - edge: "left" | "right" | "top" | "bottom", - rect: MontiorCoordinates - }; - topic: "system"; - type: "monitor-info-changed"; - virtualScreen: MontiorCoordinates; - } - - interface TrayIconInfo { - x: number; - y: number; - bounds: { - x: number; - y: number; - width: number; - height: number; - }; - monitorInfo: MonitorInfo; - } - - interface MonitorInfoDetail { - availableRect: MontiorCoordinates; - deviceId: string; - displayDeviceActive: boolean; - monitorRect: MontiorCoordinates; - name: string; - } - - interface MontiorCoordinates { - bottom: number; - left: number; - right: number; - top: number; - } - - interface VirtualScreenCoordinates { - left: number; - top: number; - } - interface SystemBaseEvent { topic: string; type: OpenFinSystemEventType; @@ -1460,89 +1419,6 @@ declare namespace fin { uuid: string; } - interface AnimationTransition { - opacity?: { - /** - * This value is clamped from 0.0 to 1.0 - */ - opacity?: number; - /** - * The total time in milliseconds this transition should take. - */ - duration?: number; - /** - * Treat 'opacity' as absolute or as a delta. Defaults to false. - */ - relative?: boolean; - }; - position?: { - /** - * Defaults to the window's current left position in virtual screen coordinates. - */ - left?: number; - /** - * Defaults to the window's current top position in virtual screen coordinates. - */ - top?: number; - /** - * The total time in milliseconds this transition should take. - */ - duration?: number; - /** - * Treat 'left' and 'top' as absolute or as deltas. Defaults to false. - */ - relative?: boolean; - }; - size?: { - /** - * Optional if height is present. Defaults to the window's current width. - */ - width?: number; - /** - * Optional if width is present. Defaults to the window's current height. - */ - height?: number; - /** - * The total time in milliseconds this transition should take. - */ - duration?: number; - /** - * Treat 'width' and 'height' as absolute or as deltas. Defaults to false. - */ - relative?: boolean; - }; - } - - interface AnimationOptions { - /** - * This option interrupts the current animation. When false it pushes this animation onto the end of the animation queue. - */ - interrupt?: boolean; - /** - * Transition effect. Defaults to 'ease-in-out'. - */ - tween?: OpenFinTweenType; - } - - interface WindowBounds { - /** - * the height of the window. - */ - height?: number; - /** - * left-most coordinate of the window. - */ - left?: number; - /** - * top-most coordinate of the window. - */ - top?: number; - /** - * the width of the window. - */ - width?: number; - } - interface SessionChangedEvent { /** * the action that triggered this event: diff --git a/types/openfin/openfin-tests.ts b/types/openfin/openfin-tests.ts index 9c8b714d05..167a6c86be 100644 --- a/types/openfin/openfin-tests.ts +++ b/types/openfin/openfin-tests.ts @@ -78,8 +78,8 @@ function test_application() { }); // getTrayIconInfo application.getTrayIconInfo(info => { - console.log(info.x, info.y, info.bounds.x, info.bounds.y, info.bounds.height, info.bounds.width, - info.monitorInfo.type, info.monitorInfo.reason); + console.log(info.x, info.y, info.bounds.left, info.bounds.top, info.bounds.height, info.bounds.width, + info.monitorInfo.reason); }); // isRunning application.isRunning(running => { From bede076919554f49d1be7bd7ed0469149602e077 Mon Sep 17 00:00:00 2001 From: Ben Stoddard Date: Tue, 30 Oct 2018 13:30:55 -0700 Subject: [PATCH 0136/1121] TargetLocator.frame - Should accept null type. --- types/selenium-webdriver/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/selenium-webdriver/index.d.ts b/types/selenium-webdriver/index.d.ts index 4721033bfd..aa8a696576 100644 --- a/types/selenium-webdriver/index.d.ts +++ b/types/selenium-webdriver/index.d.ts @@ -3448,7 +3448,7 @@ export class TargetLocator { * @return {!promise.Promise} A promise that will be resolved * when the driver has changed focus to the specified frame. */ - frame(nameOrIndex: number | WebElement): promise.Promise; + frame(nameOrIndex: number | WebElement | null): promise.Promise; /** * Schedules a command to switch the focus of all future commands to another From fee7e62da8fe71e60db027e1e52d480641789b24 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 30 Oct 2018 16:23:06 -0700 Subject: [PATCH 0137/1121] add duplexify.obj(), cork() and uncork() to duplexify --- types/duplexify/duplexify-tests.ts | 8 ++++++++ types/duplexify/index.d.ts | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/types/duplexify/duplexify-tests.ts b/types/duplexify/duplexify-tests.ts index 11d33d7303..aeed21e8dc 100644 --- a/types/duplexify/duplexify-tests.ts +++ b/types/duplexify/duplexify-tests.ts @@ -8,9 +8,17 @@ duplexify(writable, readable); duplexify(writable); duplexify(undefined, readable); +duplexify.obj(); +duplexify.obj(writable); +duplexify.obj(writable, readable); +duplexify.obj(writable, readable, {}); + const d: duplexify.Duplexify = duplexify(); d.setReadable(readable); d.setReadable(); // $ExpectError d.setWritable(writable); d.setWritable(); // $ExpectError +d.cork(); +d.uncork(); + const f: Duplex = d; diff --git a/types/duplexify/index.d.ts b/types/duplexify/index.d.ts index 791a000f8b..217de65bb0 100644 --- a/types/duplexify/index.d.ts +++ b/types/duplexify/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for duplexify 3.5 +// Type definitions for duplexify 3.6 // Project: https://github.com/mafintosh/duplexify // Definitions by: Sami Kukkonen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -11,10 +11,14 @@ export = duplexify; interface DuplexifyConstructor { (writable?: stream.Writable, readable?: stream.Readable, streamOptions?: stream.DuplexOptions): duplexify.Duplexify; new (writable?: stream.Writable, readable?: stream.Readable, streamOptions?: stream.DuplexOptions): duplexify.Duplexify; + + obj(writable?: stream.Writable, readable?: stream.Readable, streamOptions?: stream.DuplexOptions): duplexify.Duplexify; } declare var duplexify: DuplexifyConstructor; declare namespace duplexify { interface Duplexify extends stream.Duplex { + cork(): void; + uncork(): void; setWritable(writable: stream.Writable): void; setReadable(readable: stream.Readable): void; } From c2b4cb1119dd172719c14028d747b7e57dc70d19 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 30 Oct 2018 16:26:12 -0700 Subject: [PATCH 0138/1121] add myself to contributor --- types/duplexify/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/duplexify/index.d.ts b/types/duplexify/index.d.ts index 217de65bb0..7df693e93b 100644 --- a/types/duplexify/index.d.ts +++ b/types/duplexify/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for duplexify 3.6 // Project: https://github.com/mafintosh/duplexify // Definitions by: Sami Kukkonen +// Jonathan Lui // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// From 3245c642975dfdd0ebb33e6dcb1af693e4701565 Mon Sep 17 00:00:00 2001 From: FishOrBear Date: Wed, 31 Oct 2018 09:32:52 +0800 Subject: [PATCH 0139/1121] fix threejs `ShapeUtils` ref: https://github.com/mrdoob/three.js/blob/dev/src/extras/ShapeUtils.js --- types/three/three-core.d.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 66276bb1f4..1e0ed32989 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -6688,11 +6688,17 @@ export namespace SceneUtils { export function attach(child: Object3D, scene: Scene, parent: Object3D): void; } +interface Vec2 +{ + x: number; + y: number; +} + export namespace ShapeUtils { - export function area(contour: number[]): number; - export function triangulate(contour: number[], indices: boolean): number[]; - export function triangulateShape(contour: number[], holes: any[]): number[]; - export function isClockWise(pts: number[]): boolean; + export function area(contour: Vec2[]): number; + export function triangulate(contour: Vec2[], indices: boolean): number[]; + export function triangulateShape(contour: Vec2[], holes: Vec2[]): number[][]; + export function isClockWise(pts: Vec2[]): boolean; } // Extras / Audio ///////////////////////////////////////////////////////////////////// From 3857e2578f1871cf3b2ad0e858fdf8a0320e30a1 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Tue, 30 Oct 2018 22:47:46 -0300 Subject: [PATCH 0140/1121] Explicitized options interface. --- types/ansi/index.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index 976268a29a..2b11acc7a3 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -14,11 +14,16 @@ /// import { Stream } from "stream"; -declare function ansi(stream: Stream, options?: any): ansi.Cursor; +interface CursorOptions { + enabled: boolean; + buffering: boolean; +} + +declare function ansi(stream: Stream, options?: CursorOptions): ansi.Cursor; declare namespace ansi { class Cursor { - constructor(stream: Stream, options?: any); + constructor(stream: Stream, options?: CursorOptions); /** * Helper function that calls `write()` on the underlying Stream. From 607561a5dcdac05a64deedd955c68fc2e9233327 Mon Sep 17 00:00:00 2001 From: taoqf Date: Wed, 31 Oct 2018 11:22:41 +0800 Subject: [PATCH 0141/1121] add type ali-app --- types/ali-app/ali-app-tests.ts | 2153 +++++++++++++++++++++ types/ali-app/index.d.ts | 3261 ++++++++++++++++++++++++++++++++ types/ali-app/tsconfig.json | 28 + types/ali-app/tslint.json | 8 + 4 files changed, 5450 insertions(+) create mode 100644 types/ali-app/ali-app-tests.ts create mode 100644 types/ali-app/index.d.ts create mode 100644 types/ali-app/tsconfig.json create mode 100644 types/ali-app/tslint.json diff --git a/types/ali-app/ali-app-tests.ts b/types/ali-app/ali-app-tests.ts new file mode 100644 index 0000000000..a42301aed1 --- /dev/null +++ b/types/ali-app/ali-app-tests.ts @@ -0,0 +1,2153 @@ +(() => { + // https://docs.alipay.com/mini/api/ui-navigate + my.navigateTo({ + url: 'new_page?count=100' + }); + // test.js + Page({ + onLoad(query: any) { + my.alert({ + content: JSON.stringify(query), + }); + } + }); + my.redirectTo({ + url: 'new_page?count=100' + }); + // 注意:调用 navigateTo 跳转时,调用该方法的页面会被加入堆栈, + // 而 redirectTo 方法则不会。见下方示例代码 + + // 此处是one页面 + my.navigateTo({ + url: 'two?pageId=10000' + }); + + // 此处是two页面 + my.navigateTo({ + url: 'one?pageId=99999' + }); + + // 在three页面内 navigateBack,将返回one页面 + my.navigateBack({ + delta: 2 + }); + my.reLaunch({ + url: '/page/index' + }); + my.setNavigationBar({ + title: '你好', + backgroundColor: '#108ee9', + success() { + my.alert({ + content: '设置成功', + }); + }, + fail() { + my.alert({ + content: '设置是失败', + }); + }, + }); + my.showNavigationBarLoading(); + my.hideNavigationBarLoading(); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-tabbar + my.switchTab({ + url: '/home' + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-feedback + my.alert({ + title: '亲', + content: '您本月的账单已出', + buttonText: '我知道了', + success: () => { + my.alert({ + title: '用户点击了「我知道了」', + }); + }, + }); + my.confirm({ + title: '温馨提示', + content: '您是否想查询快递单号:1234567890', + confirmButtonText: '马上查询', + cancelButtonText: '暂不需要', + success: (result) => { + my.alert({ + title: `${result.confirm}`, + }); + }, + }); + my.prompt({ + title: '标题单行', + message: '说明当前状态、提示用户解决方案,最好不要超过两行。', + placeholder: '给朋友留言', + okButtonText: '确定', + cancelButtonText: '取消', + success: (result) => { + my.alert({ + title: JSON.stringify(result), + }); + }, + }); + my.showToast({ + type: 'success', + content: '操作成功', + duration: 3000, + success: () => { + my.alert({ + title: 'toast 消失了', + }); + }, + }); + my.hideToast(); + my.showLoading({ + content: '加载中...', + delay: 1000, + }); + + my.hideLoading(); + + Page({ + onLoad() { + my.showLoading(); + const that = this; + setTimeout(() => { + my.hideLoading({ + page: that, // 防止执行时已经切换到其它页面,page指向不准确 + }); + }, 4000); + } + }); + my.showNavigationBarLoading(); + my.hideNavigationBarLoading(); + my.showActionSheet({ + title: '支付宝-ActionSheet', + items: ['菜单一', '菜单二', '菜单三', '菜单四', '菜单五'], + badges: [ + { index: 0, type: 'none' }, + { index: 1, type: 'point' }, + { index: 2, type: 'num', text: '99' }, + { index: 3, type: 'text', text: '推荐' }, + { index: 4, type: 'more' }], + cancelButtonText: '取消好了', + success: (res) => { + const btn = res.index === -1 ? '取消' : `第${res.index}个`; + my.alert({ + title: `你点了${btn}按钮` + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-pulldown + Page({ + onPullDownRefresh() { + my.stopPullDownRefresh(); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-contact + my.choosePhoneContact({ + success: (res) => { + my.alert({ + content: `姓名:${res.name}\n号码:${res.mobile}` + }); + } + }); + my.chooseAlipayContact({ + count: 2, + success: (res) => { + my.alert({ + content: 'chooseAlipayContact response: ' + JSON.stringify(res) + }); + }, + fail: (res) => { + my.alert({ + content: 'chooseAlipayContact response: ' + JSON.stringify(res) + }); + } + }); + my.chooseContact({ + chooseType: 'multi', // 多选模式 + includeMe: true, // 包含自己 + includeMobileContactMode: 'known', // 仅包含双向手机通讯录联系人,也即双方手机通讯录都存有对方号码的联系人 + multiChooseMax: 3, // 最多能选择三个联系人 + multiChooseMaxTips: '超过选择的最大人数了', + success: (res) => { + my.alert({ + content: 'chooseContact : ' + JSON.stringify(res) + }); + }, + fail: (res) => { + my.alert({ + content: 'chooseContact : ' + JSON.stringify(res) + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-city + my.chooseCity({ + cities: [ + { + city: '朝阳区', + adCode: '110105', + spell: 'chaoyang' + }, + { + city: '海淀区', + adCode: '110108', + spell: 'haidian' + }, + { + city: '丰台区', + adCode: '110106', + spell: 'fengtai' + }, + { + city: '东城区', + adCode: '110101', + spell: 'dongcheng' + }, + { + city: '西城区', + adCode: '110102', + spell: 'xicheng' + }, + { + city: '房山区', + adCode: '110111', + spell: 'fangshan' + } + ], + hotCities: [ + { + city: '朝阳区', + adCode: '110105' + }, + { + city: '海淀区', + adCode: '110108' + }, + { + city: '丰台区', + adCode: '110106' + } + ], + success: (res) => { + my.alert({ + content: `${res.city}:${res.adCode}` + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-date + my.datePicker({ + format: 'yyyy-MM-dd', + currentDate: '2012-12-12', + startDate: '2012-12-10', + endDate: '2012-12-15', + success: (res) => { + my.alert({ + content: res.date, + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-animation + const animation = my.createAnimation({ + transformOrigin: "top right", + duration: 3000, + timeFunction: "ease-in-out", + delay: 100, + }); + Page({ + data: { + animationInfo: {} + }, + onShow() { + const animation = my.createAnimation({ + duration: 1000, + timeFunction: 'ease-in-out', + }); + + this.animation = animation; + + animation.scale(3, 3).rotate(60).step(); + + this.setData({ + animationInfo: animation.export() + }); + + setTimeout(() => { + animation.translate(35).step(); + this.setData({ + animationInfo: animation.export(), + }); + }, 1500); + }, + rotateAndScale(this: my.Page) { + // 旋转同时放大 + this.animation.rotate(60).scale(3, 3).step(); + this.setData({ + animationInfo: this.animation.export(), + }); + }, + rotateThenScale(this: my.Page) { + // 先旋转后放大 + this.animation.rotate(60).step(); + this.animation.scale(3, 3).step(); + this.setData({ + animationInfo: this.animation.export(), + }); + }, + rotateAndScaleThenTranslate(this: my.Page) { + // 先旋转同时放大,然后平移 + this.animation.rotate(60).scale(3, 3).step(); + this.animation.translate(100, 100).step({ duration: 2000 }); + this.setData({ + animationInfo: this.animation.export() + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-canvas + const ctx = my.createCanvasContext('awesomeCanvas'); + ctx.toTempFilePath({ + success() { }, + }); + + ctx.setTextAlign("left"); + ctx.fillText("Hello world", 0, 100); + + ctx.setTextBaseline("top"); + ctx.fillText("Hello world", 0, 100); + + ctx.setFillStyle('blue'); + ctx.fillRect(50, 50, 100, 175); + ctx.draw(); + + ctx.setStrokeStyle('blue'); + ctx.strokeRect(50, 50, 100, 175); + ctx.draw(); + + ctx.setFillStyle('red'); + ctx.setShadow(15, 45, 45, 'yellow'); + ctx.fillRect(20, 20, 100, 175); + ctx.draw(); + + const grd = ctx.createLinearGradient(10, 10, 150, 10); + grd.addColorStop(0, 'yellow'); + grd.addColorStop(1, 'blue'); + + ctx.setFillStyle(grd); + ctx.fillRect(20, 20, 250, 180); + ctx.draw(); + + grd.addColorStop(0, 'blue'); + grd.addColorStop(1, 'red'); + + ctx.setFillStyle(grd); + ctx.fillRect(20, 20, 250, 180); + ctx.draw(); + + grd.addColorStop(0.36, 'orange'); + grd.addColorStop(0.56, 'cyan'); + grd.addColorStop(0.63, 'yellow'); + grd.addColorStop(0.76, 'blue'); + grd.addColorStop(0.54, 'green'); + grd.addColorStop(1, 'purple'); + grd.addColorStop(0.4, 'red'); + + ctx.setFillStyle(grd); + ctx.fillRect(20, 20, 250, 180); + ctx.draw(); + + ctx.beginPath(); + ctx.moveTo(20, 20); + ctx.lineTo(250, 10); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineWidth(10); + ctx.moveTo(20, 35); + ctx.lineTo(250, 30); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineWidth(20); + ctx.moveTo(20, 50); + ctx.lineTo(250, 55); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineWidth(25); + ctx.moveTo(20, 80); + ctx.lineTo(250, 85); + ctx.stroke(); + + ctx.draw(); + + ctx.beginPath(); + ctx.moveTo(10, 10); + ctx.lineTo(150, 10); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineCap('round'); + ctx.setLineWidth(20); + ctx.moveTo(20, 70); + ctx.lineTo(250, 80); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineCap('butt'); + ctx.setLineWidth(10); + ctx.moveTo(25, 80); + ctx.lineTo(250, 30); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineCap('square'); + ctx.setLineWidth(10); + ctx.moveTo(35, 47); + ctx.lineTo(230, 120); + ctx.stroke(); + + ctx.draw(); + + ctx.beginPath(); + ctx.moveTo(20, 30); + ctx.lineTo(150, 70); + ctx.lineTo(20, 100); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineJoin('round'); + ctx.setLineWidth(20); + ctx.moveTo(100, 20); + ctx.lineTo(280, 80); + ctx.lineTo(100, 100); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineJoin('bevel'); + ctx.setLineWidth(20); + ctx.moveTo(60, 25); + ctx.lineTo(180, 80); + ctx.lineTo(90, 100); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineJoin('miter'); + ctx.setLineWidth(15); + ctx.moveTo(130, 70); + ctx.lineTo(250, 50); + ctx.lineTo(230, 100); + ctx.stroke(); + + ctx.draw(); + + ctx.beginPath(); + ctx.setLineWidth(15); + ctx.setLineJoin('miter'); + ctx.setMiterLimit(1); + ctx.moveTo(10, 10); + ctx.lineTo(100, 50); + ctx.lineTo(10, 90); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineWidth(15); + ctx.setLineJoin('miter'); + ctx.setMiterLimit(2); + ctx.moveTo(50, 10); + ctx.lineTo(140, 50); + ctx.lineTo(50, 90); + ctx.stroke(); + + ctx.beginPath(); + ctx.setLineWidth(15); + ctx.setLineJoin('miter'); + ctx.setMiterLimit(3); + ctx.moveTo(90, 10); + ctx.lineTo(180, 50); + ctx.lineTo(90, 90); + ctx.stroke(); + + ctx.draw(); + + ctx.rect(20, 20, 250, 80); + ctx.setFillStyle('blue'); + ctx.fill(); + ctx.draw(); + + ctx.fillRect(20, 20, 250, 80); + ctx.setFillStyle('blue'); + ctx.draw(); + + ctx.setStrokeStyle('blue'); + ctx.strokeRect(20, 20, 250, 80); + ctx.draw(); + + ctx.setFillStyle('blue'); + ctx.fillRect(250, 10, 250, 200); + ctx.setFillStyle('yellow'); + ctx.fillRect(0, 0, 150, 200); + ctx.clearRect(10, 10, 150, 75); + ctx.draw(); + + ctx.moveTo(20, 20); + ctx.lineTo(200, 20); + ctx.lineTo(200, 200); + ctx.fill(); + ctx.draw(); + + ctx.rect(20, 20, 110, 40); + ctx.setFillStyle('blue'); + ctx.fill(); + + ctx.beginPath(); + ctx.rect(20, 30, 150, 40); + + ctx.setFillStyle('yellow'); + ctx.fillRect(20, 80, 150, 40); + + ctx.rect(20, 150, 150, 40); + + ctx.setFillStyle('red'); + ctx.fill(); + ctx.draw(); + + ctx.moveTo(20, 20); + ctx.lineTo(150, 10); + ctx.lineTo(150, 150); + ctx.stroke(); + ctx.draw(); + + ctx.rect(10, 10, 100, 30); + ctx.setStrokeStyle('blue'); + ctx.stroke(); + + ctx.beginPath(); + ctx.rect(20, 50, 150, 50); + + ctx.setStrokeStyle('yellow'); + ctx.strokeRect(15, 75, 200, 35); + + ctx.rect(20, 200, 150, 30); + + ctx.setStrokeStyle('red'); + ctx.stroke(); + ctx.draw(); + + ctx.rect(20, 20, 150, 50); + ctx.setFillStyle('blue'); + ctx.fill(); + + ctx.beginPath(); + ctx.rect(20, 50, 150, 40); + + ctx.setFillStyle('yellow'); + ctx.fillRect(20, 170, 150, 40); + + ctx.rect(10, 100, 100, 30); + + ctx.setFillStyle('red'); + ctx.fill(); + ctx.draw(); + + ctx.moveTo(20, 20); + ctx.lineTo(150, 20); + ctx.lineTo(150, 150); + ctx.closePath(); + ctx.stroke(); + ctx.draw(); + + ctx.rect(20, 20, 150, 50); + ctx.closePath(); + + ctx.beginPath(); + ctx.rect(20, 50, 150, 40); + + ctx.setFillStyle('red'); + ctx.fillRect(20, 80, 120, 30); + + ctx.rect(20, 150, 150, 40); + + ctx.setFillStyle('blue'); + ctx.fill(); + ctx.draw(); + + ctx.moveTo(20, 20); + ctx.lineTo(150, 15); + + ctx.moveTo(20, 55); + ctx.lineTo(120, 60); + ctx.stroke(); + ctx.draw(); + + ctx.moveTo(20, 20); + ctx.rect(20, 20, 80, 30); + ctx.lineTo(120, 80); + ctx.stroke(); + ctx.draw(); + + ctx.arc(200, 75, 50, 0, 2 * Math.PI); + ctx.setFillStyle('#CCCCCC'); + ctx.fill(); + + ctx.beginPath(); + ctx.moveTo(50, 65); + ctx.lineTo(170, 80); + ctx.moveTo(200, 35); + ctx.lineTo(200, 235); + ctx.setStrokeStyle('#AAAAAA'); + ctx.stroke(); + + ctx.setFontSize(12); + ctx.setFillStyle('yellow'); + ctx.fillText('0', 165, 78); + ctx.fillText('0.6*PI', 96, 148); + ctx.fillText('1*PI', 15, 57); + ctx.fillText('1.7*PI', 94, 20); + + ctx.beginPath(); + ctx.arc(200, 85, 2, 0, 2 * Math.PI); + ctx.setFillStyle('blue'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(200, 35, 2, 0, 2 * Math.PI); + ctx.setFillStyle('green'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(450, 60, 2, 0, 2 * Math.PI); + ctx.setFillStyle('red'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(150, 35, 50, 0, 1.8 * Math.PI); + ctx.setStrokeStyle('#666666'); + ctx.stroke(); + + ctx.draw(); + + ctx.beginPath(); + ctx.arc(30, 30, 2, 0, 2 * Math.PI); + ctx.setFillStyle('red'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(250, 25, 2, 0, 2 * Math.PI); + ctx.setFillStyle('blue'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(20, 100, 2, 0, 2 * Math.PI); + ctx.arc(200, 100, 2, 0, 2 * Math.PI); + ctx.setFillStyle('green'); + ctx.fill(); + + ctx.setFillStyle('yellow'); + ctx.setFontSize(14); + + ctx.beginPath(); + ctx.moveTo(30, 30); + ctx.lineTo(30, 100); + ctx.lineTo(150, 75); + + ctx.moveTo(250, 30); + ctx.lineTo(250, 80); + ctx.lineTo(70, 75); + ctx.setStrokeStyle('#EEEEEE'); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(30, 30); + ctx.bezierCurveTo(30, 150, 250, 150, 180, 20); + ctx.setStrokeStyle('black'); + ctx.stroke(); + + ctx.draw(); + + ctx.beginPath(); + ctx.arc(30, 30, 2, 0, 2 * Math.PI); + ctx.setFillStyle('red'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(250, 20, 2, 0, 2 * Math.PI); + ctx.setFillStyle('blue'); + ctx.fill(); + + ctx.beginPath(); + ctx.arc(30, 200, 2, 0, 2 * Math.PI); + ctx.setFillStyle('green'); + ctx.fill(); + + ctx.setFillStyle('black'); + ctx.setFontSize(12); + + ctx.beginPath(); + ctx.moveTo(30, 30); + ctx.lineTo(30, 150); + ctx.lineTo(250, 30); + ctx.setStrokeStyle('#AAAAAA'); + ctx.stroke(); + + ctx.beginPath(); + ctx.moveTo(30, 30); + ctx.quadraticCurveTo(30, 150, 250, 25); + ctx.setStrokeStyle('black'); + ctx.stroke(); + + ctx.draw(); + + ctx.strokeRect(15, 15, 30, 25); + ctx.scale(3, 3); + ctx.strokeRect(15, 15, 30, 25); + ctx.scale(3, 3); + ctx.strokeRect(15, 15, 30, 25); + + ctx.draw(); + + ctx.strokeRect(200, 20, 180, 150); + ctx.rotate(30 * Math.PI / 180); + ctx.strokeRect(200, 20, 180, 150); + ctx.rotate(30 * Math.PI / 180); + ctx.strokeRect(200, 20, 180, 150); + + ctx.draw(); + + ctx.strokeRect(20, 20, 250, 80); + ctx.translate(30, 30); + ctx.strokeRect(20, 20, 250, 80); + ctx.translate(30, 30); + ctx.strokeRect(20, 20, 250, 80); + + ctx.draw(); + + ctx.setFontSize(14); + ctx.fillText('14', 20, 20); + ctx.setFontSize(22); + ctx.fillText('22', 40, 40); + ctx.setFontSize(30); + ctx.fillText('30', 60, 60); + ctx.setFontSize(38); + ctx.fillText('38', 90, 90); + + ctx.draw(); + + ctx.setFontSize(42); + ctx.fillText('Hello', 30, 30); + ctx.fillText('alipay', 200, 200); + + ctx.draw(); + + ctx.drawImage('https://img.alicdn.com/tfs/TB1GvVMj2BNTKJjy0FdXXcPpVXa-520-280.jpg', 2, 2, 250, 80); + ctx.draw(); + + ctx.setFillStyle('yellow'); + ctx.fillRect(10, 10, 150, 100); + ctx.setGlobalAlpha(0.2); + ctx.setFillStyle('blue'); + ctx.fillRect(50, 50, 150, 100); + ctx.setFillStyle('red'); + ctx.fillRect(100, 100, 150, 100); + + ctx.draw(); + + ctx.setLineDash([5, 15, 25]); + ctx.beginPath(); + ctx.moveTo(0, 100); + ctx.lineTo(400, 100); + ctx.stroke(); + + ctx.draw(); + + ctx.rotate(45 * Math.PI / 180); + ctx.setFillStyle('red'); + ctx.fillRect(70, 0, 100, 30); + + ctx.transform(1, 1, 0, 1, 0, 0); + ctx.setFillStyle('#000'); + ctx.fillRect(0, 0, 100, 100); + + ctx.draw(); + + ctx.rotate(45 * Math.PI / 180); + ctx.setFillStyle('red'); + ctx.fillRect(70, 0, 100, 30); + + ctx.setTransform(1, 1, 0, 1, 0, 0); + ctx.setFillStyle('#000'); + ctx.fillRect(0, 0, 100, 100); + + ctx.draw(); + + ctx.save(); + ctx.setFillStyle('red'); + ctx.fillRect(20, 20, 250, 80); + + ctx.restore(); + ctx.fillRect(60, 60, 155, 130); + + ctx.draw(); + + ctx.setFillStyle('blue'); + ctx.fillRect(20, 20, 180, 80); + ctx.draw(); + ctx.fillRect(60, 60, 250, 120); + ctx.draw(true); + + ctx.font = 'italic bold 50px cursive'; + const { width } = ctx.measureText('hello world'); + console.log(width); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-map + Page({ + onReady() { + // 使用 my.createMapContext 获取 map 上下文 + this.mapCtx = my.createMapContext('userMap'); + }, + getCenterLocation(this: my.Page) { + (this.mapCtx as my.MapContext).getCenterLocation({ + success(res) { + console.log(res.longitude); + console.log(res.latitude); + } + }); + }, + moveToLocation() { + this.mapCtx.moveToLocation(); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ui-hidekeyboard + my.hideKeyboard(); +})(); + +(() => { + // https://docs.alipay.com/mini/api/scroll + my.pageScrollTo({ + scrollTop: 100 + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/selector-query + Page({ + onReady() { + my.createSelectorQuery() + .select('#non-exists').boundingClientRect() + .select('#one').boundingClientRect() + .selectAll('.all').boundingClientRect() + .select('#scroll').scrollOffset() + .selectViewport().boundingClientRect() + .selectViewport().scrollOffset().exec((ret) => { + console.log(JSON.stringify(ret, null, 2)); + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/ewdxl3 + my.multiLevelSelect({ + title: 'nihao', // 级联选择标题 + list: [ + { + name: "杭州市", // 条目名称 + subList: [ + { + name: "西湖区", + subList: [ + { + name: "古翠街道" + }, + { + name: "文新街道" + } + ] + }, + { + name: "上城区", + subList: [ + { + name: "延安街道" + }, + { + name: "龙翔桥街道" + } + ] + } + ]// 级联子数据列表 + } + ]// 级联数据列表 + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/openapi-authorize + my.getAuthCode({ + scopes: 'auth_user', + success: (res) => { + my.alert({ + content: res.authCode, + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/userinfo + my.getAuthCode({ + scopes: 'auth_user', + success: (res) => { + my.getAuthUserInfo({ + success: (userInfo) => { + my.alert({ + content: userInfo.nickName + }); + my.alert({ + content: userInfo.avatar + }); + } + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/openapi-pay + my.tradePay({ + tradeNO: '201711152100110410533667792', // 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号trade_no + success: (res) => { + my.alert({ + content: JSON.stringify(res), + }); + }, + fail: (res) => { + my.alert({ + content: JSON.stringify(res), + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/pay-sign + my.paySignCenter({ + // tslint:disable-next-line:max-line-length + signStr: 'biz_content%3D%257B%2522access_params%2522%253A%257B%2522channel%2522%253A%2522ALIPAYAPP%2522%257D%252C%2522external_agreement_no%2522%253A%2522xidong___2317%2522%252C%2522external_logon_id%2522%253A%252213852852877%2522%252C%2522personal_product_code%2522%253A%2522GENERAL_WITHHOLDING_P%2522%252C%2522product_code%2522%253A%2522GENERAL_WITHHOLDING%2522%252C%2522sign_scene%2522%253A%2522INDUSTRY%257CCARRENTAL%2522%252C%2522third_party_type%2522%253A%2522PARTNER%2522%257D%26sign%3Df3pjBDTRftOwXWnCqAMAnkBfGTFlcMmZI8hEgmV6uREZRXVDuLsSjD8WO%252FeZ1fjDG8GqVO9t1AN7q6yCUHKX%252Bw%252FE7efXwpVDWldr4iVuXDtNd3UJDJUiRJhIm6b73czWacVzm1XIery%252F2DyKI2y08tBf5NNWuQCC3d%252FITxziTl8%253D%26timestamp%3D2017-06-27%2B14%253A44%253A00%26sign_type%3DRSA%26notify_url%3Dhttp%253A%252F%252Fapi.test.alipay.net%252Fatinterface%252Freceive_notify.htm%26charset%3DUTF-8%26app_id%3D2017060101317939%26method%3Dalipay.user.agreement.page.sign%26return_url%3Dhttp%253A%252F%252Fapi.test.alipay.net%252Fatinterface%252Freceive_notify.htm%26version%3D1.0', + success: (res) => { + my.alert({ + title: 'success', // alert框的标题 + content: JSON.stringify(res) + }); + }, + fail: (res) => { + my.alert({ + title: 'fail', // alert框的标题 + content: JSON.stringify(res) + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/card-voucher-ticket + my.openCardList(); + my.openMerchantCardList({ partnerId: '2088xxxxx' }); + // 传入passId来打开 + my.openCardDetail({ passId: "11xxxxx" }); + my.openVoucherList(); + my.openMerchantVoucherList({ partnerId: '2088xxxx' }); + // 传入passId来打开 + my.openVoucherDetail({ passId: "20170921" }); + + // 传入partnerId 和 serialNumber来打开 + my.openVoucherDetail({ + partnerId: "2018xxxx", + serialNumber: "20170921" + }); + // 传入passId来打开 + my.openKBVoucherDetail({ passId: "20170921" }); + + // 传入partnerId 和 serialNumber来打开 + my.openKBVoucherDetail({ + partnerId: "2088xxxx", + serialNumber: "20170921" + }); + my.openTicketList(); + my.openMerchantTicketList({ partnerId: '2088xxxx' }); + // 传入passId来打开 + my.openTicketDetail({ passId: "20170921" }); + + // 传入partnerId 和 serialNumber来打开 + my.openTicketDetail({ + partnerId: "2088xxxx", + serialNumber: "20170921" + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/add-card-auth + my.addCardAuth({ + url: '从 openapi 接口获取到的 url', + success: (res) => { + my.alert({ content: '授权成功' }); + }, + fail: (res) => { + my.alert({ content: '授权失败' }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/zm-service + my.startZMVerify({ + bizNo: 'your-biz-no', + success: (res) => { + my.alert({ title: 'success:' + JSON.stringify(res) }); + }, + fail: (res) => { + my.alert({ title: 'fail: ' + JSON.stringify(res) }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/zmcreditborrow + my.zmCreditBorrow({ + credit_biz: "", + out_order_no: "", + borrow_shop_name: "", + goods_name: "", + product_code: "w1010100000000002858", + rent_unit: "HOUR_YUAN", + rent_amount: "0.10", + deposit_amount: "0.50", + deposit_state: "Y", + invoke_return_url: "", + invoke_type: "TINYAPP", + borrow_time: "2017-04-27 10:01:01", + expiry_time: "2017-05-27 10:01:01", + rent_info: "2hour-free", + success: (res) => { + try { + const { resultStatus, result } = res; + switch (resultStatus) { + case '9000': + const callbackData = result.callbackData; + const decodedCallbackData = decodeURIComponent(callbackData); + const json = JSON.parse(decodedCallbackData.match(/{.*}/)!.toString()); + const jsonStr = JSON.stringify(json, null, 4); + if (json.success === true || json.success === 'true') { + // 创建订单成功, 此时可以跳转到订单详情页面 + my.alert({ content: '下单成功: ' + jsonStr }); + } else { + // 创建订单失败, 请提示用户创建失败 + my.alert({ content: '下单失败: ' + jsonStr }); + } + // (this as any as my.Page).setData({ + // callbackData, + // decodedCallbackData, + // parsedJSON: jsonStr, + // }); + break; + case '6001': + // 用户点击返回, 取消此次服务, 此时可以给提示 + my.alert({ content: '取消' }); + break; + default: + break; + } + } catch (error) { + // 异常, 请在这里提示用户稍后重试 + my.alert({ + content: '异常' + JSON.stringify(error, null, 4) + }); + } + }, + fail: (error) => { + // 调用接口失败, 请在这里提示用户稍后重试 + my.alert({ + content: '调用失败' + JSON.stringify(error, null, 4) + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/templatemessage +})(); + +(() => { + // https://docs.alipay.com/mini/api/text-identification + my.textRiskIdentification({ + content: '加我支付宝', + type: ['keyword', '0', '1', '2', '3'], + success: (res) => { + my.alert({ + title: 'ok', // alert 框的标题 + content: JSON.stringify(res), + }); + }, + fail: (res) => { + my.alert({ + title: 'fail', // alert 框的标题 + content: JSON.stringify(res), + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/open-miniprogram + my.navigateToMiniProgram({ + appId: 'xxxx', + extraData: { + data1: "test" + }, + success: (res) => { + console.log(JSON.stringify(res)); + }, + fail: (res) => { + console.log(JSON.stringify(res)); + } + }); + my.navigateBackMiniProgram({ + extraData: { + data1: "test" + }, + success: (res) => { + console.log(JSON.stringify(res)); + }, + fail: (res) => { + console.log(JSON.stringify(res)); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/webview-context + Page({ + onLoad() { + this.webViewContext = my.createWebViewContext('web-view-1'); + }, + // 接收来自H5的消息 + onMessage(e: any) { + console.log(e); // {'sendToMiniProgram': '0'} + // 向H5发送消息 + this.webViewContext.postMessage({ sendToWebView: '1' }); + } + }); + // H5的js代码中需要先定义my.onMessage 用于接收来自小程序的消息。 + my.onMessage = (e) => { + console.log(e); // {'sendToWebView': '1'} + }; + // H5想小程序发送消息 + my.postMessage({ sendToMiniProgram: '0' }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/media-image + const img = null as any as HTMLImageElement; + my.chooseImage({ + count: 2, + success: (res) => { + img.src = res.apFilePaths[0]; + }, + }); + my.previewImage({ + current: 2, + urls: [ + 'https://img.alicdn.com/tps/TB1sXGYIFXXXXc5XpXXXXXXXXXX.jpg', + 'https://img.alicdn.com/tps/TB1pfG4IFXXXXc6XXXXXXXXXXXX.jpg', + 'https://img.alicdn.com/tps/TB1h9xxIFXXXXbKXXXXXXXXXXXX.jpg' + ], + }); + my.saveImage({ + url: 'https://img.alicdn.com/tps/TB1sXGYIFXXXXc5XpXXXXXXXXXX.jpg' + }); + my.compressImage({ + apFilePaths: ['https://resource/apmlcc0ed184daffc5a0d8da86b2f518cf7b.image'], + // level: 1, + success: (res) => { + console.log(JSON.stringify(res)); + } + }); + // 网络图片路径 + my.getImageInfo({ + src: 'https://img.alicdn.com/tps/TB1sXGYIFXXXXc5XpXXXXXXXXXX.jpg', + success: (res) => { + console.log(JSON.stringify(res)); + } + }); + + // apFilePath + my.chooseImage({ + success: (res) => { + my.getImageInfo({ + src: res.apFilePaths[0], + success: (res) => { + console.log(JSON.stringify(res)); + } + }); + }, + }); + + // 相对路径 + my.getImageInfo({ + src: 'image/api.png', + success: (res) => { + console.log(JSON.stringify(res)); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/storage + my.setStorage({ + key: 'currentCity', + data: { + cityName: '杭州', + adCode: '330100', + spell: ' hangzhou', + }, + success() { + my.alert({ content: '写入成功' }); + } + }); + my.setStorageSync({ + key: 'currentCity', + data: { + cityName: '杭州', + adCode: '330100', + spell: ' hangzhou', + } + }); + my.getStorage({ + key: 'currentCity', + success(res) { + my.alert({ content: '获取成功:' + res.data.cityName }); + }, + fail(res) { + my.alert({ content: res.errorMessage }); + } + }); + const res = my.getStorageSync({ key: 'currentCity' }); + my.alert({ + content: JSON.stringify(res.data), + }); + my.removeStorage({ + key: 'currentCity', + success() { + my.alert({ content: '删除成功' }); + } + }); + my.removeStorageSync({ + key: 'currentCity', + }); + my.clearStorage(); + my.clearStorageSync(); + my.getStorageInfo({ + success(res) { + console.log(res.keys); + console.log(res.currentSize); + console.log(res.limitSize); + } + }); + const res1 = my.getStorageInfoSync(); + console.log(res1.keys); + console.log(res1.currentSize); + console.log(res1.limitSize); +})(); + +(() => { + // https://docs.alipay.com/mini/api/file + my.chooseImage({ + success: (res) => { + my.saveFile({ + apFilePath: res.apFilePaths[0], + success: (res) => { + console.log(JSON.stringify(res)); + }, + }); + }, + }); + my.getFileInfo({ + apFilePath: 'https://resource/apml953bb093ebd2834530196f50a4413a87.video', + digestAlgorithm: 'sha1', + success: (res) => { + console.log(JSON.stringify(res)); + } + }); + my.getSavedFileInfo({ + apFilePath: 'https://resource/apml953bb093ebd2834530196f50a4413a87.video', + success: (res) => { + console.log(JSON.stringify(res)); + } + }); + my.getSavedFileList({ + success: (res) => { + console.log(JSON.stringify(res)); + } + }); + my.getSavedFileList({ + success: (res) => { + my.removeSavedFile({ + apFilePath: res.fileList[0].apFilePath, + success: (res) => { + console.log('remove success'); + } + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/location + my.getLocation({ + success(res) { + my.hideLoading(); + console.log(res); + /* that对象为Page可以设置数据刷新界面 + that.setData({ + hasLocation: true, + location: formatLocation(res.longitude, res.latitude) + }) + */ + }, + fail() { + my.hideLoading(); + my.alert({ title: '定位失败' }); + }, + }); + my.openLocation({ + longitude: '121.549697', + latitude: '31.227250', + name: '支付宝', + address: '杨高路地铁站', + }); + my.chooseLocation({ + success: (res) => { + console.log(res); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/network + my.httpRequest({ + url: 'http://httpbin.org/post', + method: 'POST', + data: { + from: '支付宝', + production: 'AlipayJSAPI', + }, + dataType: 'json', + success(res) { + my.alert({ content: 'success' }); + }, + fail(res) { + my.alert({ content: 'fail' }); + }, + complete(res) { + my.hideLoading(); + my.alert({ content: 'complete' }); + } + }); + my.uploadFile({ + url: '请使用自己服务器地址', + fileType: 'image', + fileName: 'file', + filePath: '...', + success: (res) => { + my.alert({ + content: '上传成功' + }); + }, + }); + my.downloadFile({ + url: 'http://img.alicdn.com/tfs/TB1x669SXXXXXbdaFXXXXXXXXXX-520-280.jpg', + success({ apFilePath }) { + my.previewImage({ + urls: [apFilePath], + }); + }, + fail(res) { + my.alert({ + content: res.errorMessage || res.error, + }); + }, + }); + my.connectSocket({ + url: 'test.php', + data: {}, + header: { + 'content-type': 'application/json' + }, + method: 'GET' + }); + my.connectSocket({ + url: 'test.php', + }); + + my.onSocketOpen(() => { + console.log('WebSocket 连接已打开!'); + }); + Page({ + onLoad() { + this.callback = this.callback.bind(this); + my.onSocketOpen(this.callback); + }, + onUnload() { + my.offSocketOpen(this.callback); + }, + callback() { + }, + }); + my.connectSocket({ + url: '开发者的服务器地址' + }); + + my.onSocketOpen(() => { + console.log('WebSocket 连接已打开!'); + }); + + my.onSocketError(() => { + console.log('WebSocket 连接打开失败,请检查!'); + }); + Page({ + onLoad() { + this.callback = this.callback.bind(this); + my.onSocketError(this.callback); + }, + onUnload() { + my.offSocketError(this.callback); + }, + callback() { + my.sendSocketMessage({ + data: this.data.toSendMessage, // 需要发送的内容 + success: (res) => { + my.alert({ content: '数据发送!' + this.data.toSendMessage }); + }, + }); + }, + }); + my.connectSocket({ + url: '服务器地址' + }); + + my.onSocketMessage((res) => { + console.log('收到服务器内容:' + res.data); + }); + my.onSocketOpen(() => { + my.closeSocket(); + }); + + my.onSocketClose(() => { + console.log('WebSocket 已关闭!'); + }); + Page({ + // onLoad() { + onLaunch() { + // 注意: 回调方法的注册在整个小程序启动阶段只要做一次,调多次会有多次回调 + my.onSocketClose(() => { + my.alert({ content: '连接已关闭!' }); + this.setData({ + sendMessageAbility: false, + closeLinkAbility: false, + }); + }); + // 注意: 回调方法的注册在整个小程序启动阶段只要做一次,调多次会有多次回调 + my.onSocketOpen(() => { + my.alert({ content: '连接已打开!' }); + this.setData({ + sendMessageAbility: true, + closeLinkAbility: true, + }); + }); + + my.onSocketError((res) => { + my.alert({ content: 'WebSocket 连接打开失败,请检查!' + res }); + }); + + // 注意: 回调方法的注册在整个小程序启动阶段只要做一次,调多次会有多次回调 + my.onSocketMessage((res) => { + my.alert({ content: '收到数据!' + JSON.stringify(res) }); + }); + }, + connect_start() { + my.connectSocket({ + url: '服务器地址', // 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名 + success: (res) => { + my.showToast({ + content: 'success', // 文字内容 + }); + }, + fail: () => { + my.showToast({ + content: 'fail', // 文字内容 + }); + } + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/can-i-use + my.canIUse('getFileInfo'); + my.canIUse('closeSocket.object.code'); + my.canIUse('getLocation.object.type'); + my.canIUse('getSystemInfo.return.brand'); + my.canIUse('lifestyle'); + my.canIUse('button.open-type.share'); +})(); + +(() => { + // https://docs.alipay.com/mini/api/sdk-version + console.log(my.SDKVersion); +})(); + +(() => { + // https://docs.alipay.com/mini/api/system-info + Page({ + data: { + systemInfo: {} + }, + getSystemInfoPage(this: my.Page) { + my.getSystemInfo({ + success: (res) => { + this.setData({ + systemInfo: res + }); + } + }); + }, + }); + Page({ + data: { + systemInfo: {} + }, + getSystemInfoSyncPage(this: my.Page) { + this.setData({ + systemInfo: my.getSystemInfoSync() + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/network-status + Page({ + data: { + hasNetworkType: false + }, + getNetworkType(this: my.Page) { + my.getNetworkType({ + success: (res) => { + this.setData({ + hasNetworkType: true, + networkType: res.networkType + }); + } + }); + }, + clear(this: my.Page) { + this.setData({ + hasNetworkType: false, + networkType: '' + }); + }, + }); + my.onNetworkStatusChange((res) => { + console.log(JSON.stringify(res)); + }); + my.offNetworkStatusChange(); +})(); + +(() => { + // https://docs.alipay.com/mini/api/clipboard + Page({ + data: { + text: '3.1415926', + copy: '', + }, + + handlePaste(this: my.Page) { + my.getClipboard({ + success: ({ text }) => { + this.setData({ copy: text }); + }, + }); + }, + }); + Page({ + data: { + text: '3.1415926', + copy: '', + }, + + handleCopy() { + my.setClipboard({ + text: this.data.text, + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/shake + Page({ + watchShake() { + my.watchShake({ + success() { + console.log('动起来了'); + my.alert({ title: '动起来了 o.o' }); + } + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/vibrate + Page({ + vibrate() { + my.vibrate({ + success: () => { + my.alert({ title: '震动起来了' }); + } + }); + }, + }); + Page({ + vibrateLong() { + my.vibrateLong({ + success: () => { + my.alert({ title: '震动起来了' }); + } + }); + }, + }); + Page({ + vibrateShort() { + my.vibrateShort({ + success: () => { + my.alert({ title: '震动起来了' }); + } + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/macke-call + Page({ + makePhoneCall() { + my.makePhoneCall({ number: '95888' }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/get-server-time + // getServerTime(){ + // my.getServerTime({ + // success: (res) => { + // my.alert({ + // title: res.time, + // }); + // }, + // }); + // }; +})(); + +(() => { + // https://docs.alipay.com/mini/api/user-capture-screen + my.onUserCaptureScreen(() => { + my.alert({ + content: '收到用户截屏事件' + }); + }); + my.offUserCaptureScreen(); +})(); + +(() => { + // https://docs.alipay.com/mini/api/screen-brightness + my.setKeepScreenOn({ + keepScreenOn: true, + success: (res) => { + }, + fail: (res) => { + }, + }); + my.getScreenBrightness({ + success: (res) => { + console.log(JSON.stringify(res)); + }, + fail: (res) => { + }, + }); + my.setScreenBrightness({ + brightness: 0.5, + success: (res) => { + console.log(JSON.stringify(res)); + }, + fail: (res) => { + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/show-auth-guide + my.showAuthGuide({ + authType: 'LBSSERVICE' + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/scan + Page({ + scan() { + my.scan({ + type: 'qr', + success: (res) => { + my.alert({ title: res.code }); + }, + }); + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/bluetooth-intro + // 初始化 + my.openBluetoothAdapter({ + success: (res) => { + console.log(res); + } + }); + // 注册发现事件 + my.onBluetoothDeviceFound({ + success: (res) => { + const device = res.devices[0]; + // 连接发现的设备 + my.connectBLEDevice({ + deviceId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + // 停止搜索 + my.stopBluetoothDevicesDiscovery({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + } + }); + const deviceId = 'test'; + const serviceId = 'test'; + const characteristicId = 'test'; + // 注册连接事件 + my.onBLEConnectionStateChanged({ + success: (res) => { + console.log(res); + if (res.connected) { + // 开始读写notify等操作 + my.notifyBLECharacteristicValueChange({ + deviceId, + serviceId, + characteristicId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + } + } + }); + // 注册接收read或notify的数据 + my.onBLECharacteristicValueChange({ + success: (res) => { + console.log(res); + } + }); + // 开始搜索 + my.startBluetoothDevicesDiscovery({ + services: ['fff0'], + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + + // 断开连接 + my.disconnectBLEDevice({ + deviceId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + + // 注销事件 + my.offBluetoothDeviceFound(); + my.offBLEConnectionStateChanged(); + my.offBLECharacteristicValueChange(); + + // 退出蓝牙模块 + my.closeBluetoothAdapter({ + success: (res) => { + }, + fail: (res) => { + }, + complete: (res) => { + } + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/bluetooth-api + my.openBluetoothAdapter({ + success: (res) => { + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.closeBluetoothAdapter({ + success: (res) => { + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.getBluetoothAdapterState({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.startBluetoothDevicesDiscovery({ + services: ['fff0'], + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.stopBluetoothDevicesDiscovery({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.getBluetoothDevices({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.getConnectedBluetoothDevices({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + const deviceId = 'test'; + const serviceId = 'test'; + const characteristicId = 'test'; + my.connectBLEDevice({ + // 这里的 deviceId 需要在上面的 getBluetoothDevices 或 onBluetoothDeviceFound 接口中获取 + deviceId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.disconnectBLEDevice({ + deviceId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.writeBLECharacteristicValue({ + deviceId, + serviceId, + characteristicId, + value: 'fffe', + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.readBLECharacteristicValue({ + deviceId, + serviceId, + characteristicId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.notifyBLECharacteristicValueChange({ + deviceId, + serviceId, + characteristicId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.getBLEDeviceServices({ + deviceId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + my.getBLEDeviceCharacteristics({ + deviceId, + serviceId, + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + Page({ + onLoad() { + this.callback = this.callback.bind(this); + my.onBluetoothDeviceFound(this.callback); + }, + onUnload() { + my.offBluetoothDeviceFound(this.callback); + }, + callback(res: any) { + console.log(res); + }, + }); + my.offBluetoothDeviceFound(); + Page({ + onLoad() { + this.callback = this.callback.bind(this); + my.onBLECharacteristicValueChange(this.callback); + }, + onUnload() { + my.offBLECharacteristicValueChange(this.callback); + }, + callback(res: any) { + console.log(res); + }, + }); + my.offBLECharacteristicValueChange(); + my.offBLEConnectionStateChanged(); + my.offBluetoothAdapterStateChange(); +})(); + +(() => { + // https://docs.alipay.com/mini/api/yqleyc + my.startBeaconDiscovery({ + uuids: ['uuid1', 'uuid2'], + success: (res) => { + console.log(res); + }, + fail: () => { + }, + complete: () => { + } + }); + + my.stopBeaconDiscovery({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + + my.getBeacons({ + success: (res) => { + console.log(res); + }, + fail: (res) => { + }, + complete: (res) => { + } + }); + + my.onBeaconUpdate({ + success: (res) => { + }, + }); + + my.onBeaconServiceChange({ + success: (res) => { + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/data-safe + Page({ + data: { + inputValue: '', + outputValue: '', + }, + onInput(this: my.Page, e: any) { + this.setData({ inputValue: e.detail.value }); + }, + onEncrypt(this: my.Page) { + my.rsa({ + action: 'encrypt', + // 设置公钥 + // tslint:disable-next-line:max-line-length + key: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDKmi0dUSVQ04hL6GZGPMFK8+d6\nGzulagP27qSUBYxIJfE04KT+OHVeFFb6K+8nWDea5mkmZrIgp022zZVDgdWPNM62\n3ouBwHlsfm2ekey8PpQxfXaj8lhM9t8rJlC4FEc0s8Qp7Q5/uYrowQbT9m6t7BFK\n3egOO2xOKzLpYSqfbQIDAQAB', + text: this.data.inputValue, + success: (result) => { + this.setData({ outputValue: result.text }); + }, + fail(e) { + my.alert({ + content: e.errorMessage || e.error, + }); + }, + }); + }, + onDecrypt(this: my.Page) { + my.rsa({ + action: 'decrypt', + text: this.data.inputValue, + // 设置私钥 + // tslint:disable-next-line:prefer-template + key: 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMqaLR1RJVDTiEvo\n' + + 'ZkY8wUrz53obO6VqA/bupJQFjEgl8TTgpP44dV4UVvor7ydYN5rmaSZmsiCnTbbN\n' + + 'lUOB1Y80zrbei4HAeWx+bZ6R7Lw+lDF9dqPyWEz23ysmULgURzSzxCntDn+5iujB\n' + + 'BtP2bq3sEUrd6A47bE4rMulhKp9tAgMBAAECgYBjsfRLPdfn6v9hou1Y2KKg+F5K\n' + + 'ZsY2AnIK+6l+sTAzfIAx7e0ir7OJZObb2eyn5rAOCB1r6RL0IH+MWaN+gZANNG9g\n' + + 'pXvRgcZzFY0oqdMZDuSJjpMTj7OEUlPyoGncBfvjAg0zdt9QGAG1at9Jr3i0Xr4X\n' + + '6WrFhtfVlmQUY1VsoQJBAPK2Qj/ClkZNtrSDfoD0j083LcNICqFIIGkNQ+XeuTwl\n' + + '+Gq4USTyaTOEe68MHluiciQ+QKvRAUd4E1zeZRZ02ikCQQDVscINBPTtTJt1JfAo\n' + + 'wRfTzA0Lvgig136xLLeQXREcgq1lzgkf+tGyUGYoy9BXsV0mOuYAT9ldja4jhJeq\n' + + 'cEulAkEAuSJ5KjV9dyb0RIFAz5C8d8o5KAodwaRIxJkPv5nCZbT45j6t9qbJxDg8\n' + + 'N+vghDlHI4owvl5wwVlAO8iQBy8e8QJBAJe9CVXFV0XJR/n/XnER66FxGzJjVi0f\n' + + '185nOlFARI5CHG5VxxT2PUCo5mHBl8ctIj+rQvalvGs515VQ6YEVDCECQE3S0AU2\n' + + 'BKyFVNtTpPiTyRUWqig4EbSXwjXdr8iBBJDLsMpdWsq7DCwv/ToBoLg+cQ4Crc5/\n5DChU8P30EjOiEo=', + success: (result) => { + this.setData({ outputValue: result.text }); + }, + fail(e) { + my.alert({ + content: e.errorMessage || e.error, + }); + }, + }); + }, + }); +})(); + +(() => { + // https://docs.alipay.com/mini/api/share_app + Page({ + onShareAppMessage() { + return { + title: '小程序示例', + desc: '小程序官方示例Demo,展示已支持的接口能力及组件。', + path: 'page/component/component-pages/view/view?param=123' + }; + }, + }); + + my.hideShareMenu(); +})(); + +(() => { + // https://docs.alipay.com/mini/api/report + my.reportAnalytics('purchase', { + status: 200, + reason: 'ok' + }); +})(); diff --git a/types/ali-app/index.d.ts b/types/ali-app/index.d.ts new file mode 100644 index 0000000000..371c4734d0 --- /dev/null +++ b/types/ali-app/index.d.ts @@ -0,0 +1,3261 @@ +// Type definitions for ali-app 1.0 +// Project: https://docs.alipay.com/mini/api/overview (Does not have to be to GitHub, but prefer linking to a source code repository rather than to a project website.) +// Definitions by: taoqf +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// 公共部分 +declare namespace my { + // #region 基本参数 + interface DataResponse { + /** 回调函数返回的内容 */ + data: string | ArrayBuffer | any; + /** 开发者服务器返回的 HTTP 状态码 */ + status: number; + /** 开发者服务器返回的 HTTP Response Header */ + headers: object; + } + interface ErrMsgResponse { + /** 成功:ok,错误:详细信息 */ + errMsg: "ok" | string; + } + interface TempFileResponse { + /** 文件的临时路径 */ + apFilePath: string; + } + interface BaseOptions { + /** 接口调用成功的回调函数 */ + success?(res: R): void; + /** 接口调用失败的回调函数 */ + fail?(res: E): void; + /** 接口调用结束的回调函数(调用成功、失败都会执行) */ + complete?(res: any): void; + } + interface ErrCodeResponse { + errCode: number; + } + // #endregion +} + +// 界面 +declare namespace my { + //#region 导航栏 https://docs.alipay.com/mini/api/ui-navigate + interface NavigateToOptions extends BaseOptions { + /** 需要跳转的应用内页面的路径 */ + url: string; + } + /** + * 保留当前页面,跳转到应用内的某个页面,使用wx.navigateBack可以返回到原页面。 + * + * 注意:为了不让用户在使用小程序时造成困扰, + * 我们规定页面路径只能是五层,请尽量避免多层级的交互方式。 + */ + function navigateTo(options: NavigateToOptions): void; + + interface RedirectToOptions extends BaseOptions { + /** 需要跳转的应用内页面的路径 */ + url: string; + } + /** + * 关闭当前页面,跳转到应用内的某个页面。 + */ + function redirectTo(options: RedirectToOptions): void; + + interface NavigateBackOptions extends BaseOptions { + /** 返回的页面数,如果 delta 大于现有打开的页面数,则返回到首页 */ + delta: number; + } + /** + * 关闭当前页面,返回上一级或多级页面。可通过 getCurrentPages 获取当前的页面栈信息,决定需要返回几层。 + */ + function navigateBack(options?: NavigateBackOptions): void; + + interface ReLaunchOptions extends BaseOptions { + /** + * 需要跳转的应用内页面路径 , 路径后可以带参数。 + * 参数与路径之间使用?分隔,参数键与参数值用=相连,不同参数用&分隔 + * 如 'path?key=value&key2=value2',如果跳转的页面路径是 tabBar 页面则不能带参数 + */ + url: string; + } + /** + * 关闭所有页面,打开到应用内的某个页面。 + */ + function reLaunch(options?: ReLaunchOptions): void; + + interface SetNavigationBarOptions extends BaseOptions { + /** 页面标题 */ + title: string; + /** 图片连接地址,必须是https,请使用3x高清图片。若设置了image则title参数失效 */ + image: string; + /** 导航栏背景色,支持十六进制颜色值 */ + backgroundColor: string; + /** 导航栏底部边框颜色,支持十六进制颜色值。若设置了 backgroundColor,则borderBottomColor 不会生效,默认会和 backgroundColor 颜色一样 */ + borderBottomColor: string; + /** 是否重置导航栏为支付宝默认配色,默认 false */ + reset: boolean; + } + /** + * 动态设置当前页面的标题。 + */ + function setNavigationBar(options: Partial): void; + + /** + * 显示导航栏 loading + */ + function showNavigationBarLoading(): void; + + /** 隐藏导航栏 loading。 */ + function hideNavigationBarLoading(): void; + //#endregion + + //#region TabBar https://docs.alipay.com/mini/api/ui-tabbar + interface SwitchTabOptions extends BaseOptions { + /** + * 需要跳转的 tabBar 页面的路径 + * (需在 app.json 的 tabBar 字段定义的页面),路径后不能带参数 + */ + url: string; + } + /** + * 跳转到指定 tabBar 页面,并关闭其他所有非 tabBar 页面 + */ + function switchTab(options: SwitchTabOptions): void; + //#endregion + + //#region 交互反馈 https://docs.alipay.com/mini/api/ui-feedback + + interface AlertOptions extends BaseOptions { + /** alert框的标题 */ + title: string; + /** alert框的内容 */ + content: string; + /** 按钮文字,默认确定 */ + buttonText: string; + } + function alert(options: Partial): void; + + interface ConfirmOptions extends BaseOptions { + /** confirm框的标题 */ + title: string; + /** confirm框的内容 */ + content: string; + /** 确认按钮文字,默认‘确定’ */ + confirmButtonText: string; + /** 确认按钮文字,默认‘取消’ */ + cancelButtonText: string; + success(result: { confirm: boolean; }): void; + } + function confirm(options: Partial): void; + + interface PromptOptions extends BaseOptions { + /** prompt框标题 */ + title?: string; + /** prompt框文本,默认‘请输入内容’ */ + message: string; + /** 输入框内的提示文案 */ + placeholder: string; + /** message对齐方式,可用枚举left/center/right,iOS ‘center’, android ‘left’ */ + align?: 'left' | 'center' | 'right' | string; + /** 确认按钮文字,默认‘确定’ */ + okButtonText: string; + /** 确认按钮文字,默认‘取消’ */ + cancelButtonText: string; + success(result: { ok: boolean; inputValue: string; }): void; + } + function prompt(options: PromptOptions): void; + + interface ToastOptions extends BaseOptions { + /** + * 文字内容 + */ + content: string; + /** toast 类型,展示相应图标,默认 none,支持 success / fail / exception / none’。其中 exception 类型必须传文字信息 */ + type: 'none' | 'success' | 'fail' | 'exception' | string; + /** + * 显示时长,单位为 ms,默认 2000 + */ + duration?: number; + } + /** + * 显示消息提示框 + */ + function showToast(options: Partial): void; + function hideToast(): void; + + interface LoadingOptions extends BaseOptions { + /** + * loading的文字内容 + */ + content: string; + /** 延迟显示,单位 ms,默认 0。如果在此时间之前调用了 my.hideLoading 则不会显示 */ + delay: number; + } + /** + * 显示加载提示 + */ + function showLoading(options?: LoadingOptions): void; + interface HideLoadingOptions { + /** + * 体指当前page实例,某些场景下,需要指明在哪个page执行hideLoading。 + */ + page: any; + } + /** + * 隐藏消息提示框 + */ + function hideLoading(options?: HideLoadingOptions): void; + + interface Badge { + /** 需要飘红的选项的索引,从0开始 */ + index: number; + /** + * 飘红类型,支持 none(无红点)/ point(纯红点) / num(数字红点)/ text(文案红点)/ more(...) + * + */ + type: 'none' | 'point' | 'num' | 'text' | 'more' | string; + + /** + * 自定义飘红文案: + * + * 1、type为none/point/more时本文案可不填 + * 2、type为num时本文案为小数或<=0均不显示, >100 显示"..." + */ + text: string; + } + interface ActionSheetOptions extends BaseOptions { + /** 菜单标题 */ + title: string; + /** + * 菜单按钮文字数组 + */ + items?: string[]; + /** + * 取消按钮文案。默认为‘取消’。注:Android平台此字段无效,不会显示取消按钮。 + */ + cancelButtonText?: string; + /** + * (iOS特殊处理)指定按钮的索引号,从0开始,使用场景:需要删除或清除数据等类似场景,默认红色 + */ + destructiveBtnIndex?: number; + /** + * 需飘红选项的数组,数组内部对象字段见下表 + */ + badges?: Array>; + /** + * 接口调用成功的回调函数 + */ + success?(res: { + /** + * 用户点击的按钮,从上到下的顺序,从0开始 + */ + index: number; + }): void; + } + /** + * 显示操作菜单 + */ + function showActionSheet(options: ActionSheetOptions): void; + //#endregion + + //#region 下拉刷新 https://docs.alipay.com/mini/api/ui-pulldown + /** + * Page 实现的接口对象 + */ + interface PageOptions { + /** + * 下拉刷新 + * 在 Page 中定义 onPullDownRefresh 处理函数,监听该页面用户下拉刷新事件。 + * 需要在页面对应的 .json 配置文件中配置 "pullRefresh": true 选项,才能开启下拉刷新事件。 + * 当处理完数据刷新后,调用 my.stopPullDownRefresh 可以停止当前页面的下拉刷新。 + */ + onPullDownRefresh?(this: Page): void; + } + /** + * 停止当前页面的下拉刷新。 + */ + function stopPullDownRefresh(): void; + //#endregion + + //#region 联系人 https://docs.alipay.com/mini/api/ui-contact + interface ChoosePhoneContactOptions extends BaseOptions { + success(result: { + name: string; // 选中的联系人姓名 + mobile: string; // 选中的联系人手机号 + }): void; + /** + * 10 没有权限 + * 11 用户取消操作(或设备未授权使用通讯录) + */ + fail?(error: 10 | 11): void; + } + /** + * 选择本地系统通信录中某个联系人的电话。 + */ + function choosePhoneContact(options: ChoosePhoneContactOptions): void; + + interface ChooseAlipayContactOptions extends BaseOptions { + /** 单次最多选择联系人个数,默认 1,最大 10 */ + count: number; + success(result: { + realName: string; // 账号的真实姓名 + mobile: string; // 账号对应的手机号码 + email: string; // 账号的邮箱 + avatar: string; // 账号的头像链接 + userId: string; // 支付宝账号唯一 userId + }): void; + /** + * 10 没有权限 + * 11 用户取消操作(或设备未授权使用通讯录) + */ + fail?(error: 10 | 11): void; + } + /** + * 唤起支付宝通讯录,选择一个或者多个支付宝联系人。 + */ + function chooseAlipayContact(options: ChooseAlipayContactOptions): void; + + interface ContactsDic { + /** + * 支付宝账号唯一 userId + */ + userId: string; + /** + * 账号的头像链接 + */ + avatar: string; + /** + * 账号对应的手机号码 + */ + mobile: string; + /** + * 账号的真实姓名 + */ + realName: string; + /** + * 账号的显示名称:也即支付宝设置的备注名称,默认为朋友圈里面的昵称 + */ + displayName: string; // 账号的显示名称:也即支付宝设置的备注名称,默认为朋友圈里面的昵称 + } + interface ChooseContactOptions extends BaseOptions { + /** 选择类型,值为single(单选)或者 multi(多选) */ + chooseType: 'single' | 'multi' | string; + /** 包含手机通讯录联系人的模式:默认为不包含(none)、或者仅仅包含双向通讯录联系人(known)、或者包含手机通讯录联系人(all) */ + includeMobileContactMode?: 'none' | 'known' | 'all' | string; + /** 是否包含自己 */ + includeMe?: boolean; + /** 最大选择人数,仅 chooseType 为 multi 时才有效 */ + multiChooseMax?: number; + /** 多选达到上限的文案,仅 chooseType 为 multi 时才有效 */ + multiChooseMaxTips?: string; + + success(result: { + contactsDicArray: ContactsDic[]; + }): void; + } + /** + * 唤起选人组件,默认只包含支付宝联系人,可以通过修改参数包含手机通讯录联系人或者双向通讯录联系人。 + */ + function chooseContact(options: ChooseContactOptions): void; + //#endregion + + //#region 选择城市 https://docs.alipay.com/mini/api/ui-city + interface City { + city: string; // 城市名 + adCode: string; // 行政区划代码 + spell?: string; // 城市名对应拼音拼写,方便用户搜索 + } + interface ChooseCityOptions extends BaseOptions { + showLocatedCity: boolean; // 是否显示当前定位城市,默认 false + showHotCities: boolean; // 是否显示热门城市,默认 true + cities: City[]; // 自定义城市列表,列表内对象字段见下表 + hotCities: City[]; // 自定义热门城市列表,列表内对象字段见下表 + success(result: { city: string; adCode: string; }): void; + } + /** + * 打开城市选择列表 + * + * 如果用户没有选择任何城市直接点击了返回,将不会触发回调函数。 + */ + function chooseCity(options: Partial): void; + //#endregion + + //#region 选择日期 https://docs.alipay.com/mini/api/ui-date + interface DatePickerOptions extends BaseOptions { + /** + * 返回的日期格式, + * 1. yyyy-MM-dd(默认) + * 2. HH:mm + * 3. yyyy-MM-dd HH:mm + * 4. yyyy-MM (最低基础库:1.1.1, 可用 canIUse('datePicker.object.format.yyyy-MM') 判断) + * 5. yyyy (最低基础库:1.1.1,可用 canIUse('datePicker.object.format.yyyy') 判断) + */ + format: 'yyyy-MM-dd' | 'HH:mm' | 'yyyy-MM-dd HH:mm' | 'yyyy-MM' | 'yyyy'; + /** 初始选择的日期时间,默认当前时间 */ + currentDate: string; + /** 最小日期时间 */ + startDate: string; + /** 最大日期时间 */ + endDate: string; + success(result: { date: string; }): void; + /** 11 用户取消操作 */ + fail(error: 11): void; + } + /** + * 打开日期选择列表 + */ + function datePicker(optiosn: Partial): void; + //#endregion + + //#region 动画 https://docs.alipay.com/mini/api/ui-animation + type TimingFunction = + | "linear" + | "ease" + | "ease-in" + | "ease-in-out" + | "ease-out" + | "step-start" + | "step-end"; + interface CreateAnimationOptions { + /** 动画持续时间,单位ms,默认值 400 */ + duration: number; + /** 定义动画的效果,默认值"linear",有效值:"linear","ease","ease-in","ease-in-out","ease-out","step-start","step-end" */ + timeFunction: TimingFunction; + /** 动画持续时间,单位 ms,默认值 0 */ + delay: number; + /** 设置transform-origin,默认为"50% 50% 0" */ + transformOrigin: string; + } + interface Animator { + actions: AnimationAction[]; + } + interface AnimationAction { + animates: Animate[]; + option: AnimationActionOption; + } + interface AnimationActionOption { + transformOrigin: string; + transition: AnimationTransition; + } + interface AnimationTransition { + delay: number; + duration: number; + timingFunction: TimingFunction; + } + interface Animate { + type: string; + args: any[]; + } + /** + * 创建动画实例 animation。调用实例的方法来描述动画,最后通过动画实例的export方法将动画数据导出并传递给组件的animation属性。 + * + * 注意: export 方法每次调用后会清掉之前的动画操作 + */ + function createAnimation(options: Partial): Animation; + /** 动画实例可以调用以下方法来描述动画,调用结束后会返回自身,支持链式调用的写法。 */ + interface Animation { + /** + * 调用动画操作方法后要调用 step() 来表示一组动画完成, + * 可以在一组动画中调用任意多个动画方法, + * 一组动画中的所有动画会同时开始, + * 一组动画完成后才会进行下一组动画。 + * @param options 指定当前组动画的配置 + */ + step(options?: CreateAnimationOptions): void; + /** + * 导出动画操作 + * + * 注意: export 方法每次调用后会清掉之前的动画操作 + */ + export(): Animator; + /** 透明度,参数范围 0~1 */ + opacity(value: number): Animation; + /** 颜色值 */ + backgroundColor(color: string): Animation; + /** 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值 */ + width(length: number): Animation; + /** 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值 */ + height(length: number): Animation; + /** 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值 */ + top(length: number): Animation; + /** 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值 */ + left(length: number): Animation; + /** 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值 */ + bottom(length: number): Animation; + /** 长度值,如果传入 Number 则默认使用 px,可传入其他自定义单位的长度值 */ + right(length: number): Animation; + /** deg的范围-180~180,从原点顺时针旋转一个deg角度 */ + rotate(deg: number): Animation; + /** deg的范围-180~180,在X轴旋转一个deg角度 */ + rotateX(deg: number): Animation; + /** deg的范围-180~180,在Y轴旋转一个deg角度 */ + rotateY(deg: number): Animation; + /** deg的范围-180~180,在Z轴旋转一个deg角度 */ + rotateZ(deg: number): Animation; + /** 同transform-function rotate3d */ + rotate3d(x: number, y: number, z: number, deg: number): Animation; + /** + * 一个参数时,表示在X轴、Y轴同时缩放sx倍数; + * 两个参数时表示在X轴缩放sx倍数,在Y轴缩放sy倍数 + */ + scale(sx: number, sy?: number): Animation; + /** 在X轴缩放sx倍数 */ + scaleX(sx: number): Animation; + /** 在Y轴缩放sy倍数 */ + scaleY(sy: number): Animation; + /** 在Z轴缩放sy倍数 */ + scaleZ(sz: number): Animation; + /** 在X轴缩放sx倍数,在Y轴缩放sy倍数,在Z轴缩放sz倍数 */ + scale3d(sx: number, sy: number, sz: number): Animation; + /** + * 一个参数时,表示在X轴偏移tx,单位px; + * 两个参数时,表示在X轴偏移tx,在Y轴偏移ty,单位px。 + */ + translate(tx: number, ty?: number): Animation; + /** + * 在X轴偏移tx,单位px + */ + translateX(tx: number): Animation; + /** + * 在Y轴偏移tx,单位px + */ + translateY(ty: number): Animation; + /** + * 在Z轴偏移tx,单位px + */ + translateZ(tz: number): Animation; + /** + * 在X轴偏移tx,在Y轴偏移ty,在Z轴偏移tz,单位px + */ + translate3d(tx: number, ty: number, tz: number): Animation; + /** + * 参数范围-180~180; + * 一个参数时,Y轴坐标不变,X轴坐标延顺时针倾斜ax度; + * 两个参数时,分别在X轴倾斜ax度,在Y轴倾斜ay度 + */ + skew(ax: number, ay?: number): Animation; + /** 参数范围-180~180;Y轴坐标不变,X轴坐标延顺时针倾斜ax度 */ + skewX(ax: number): Animation; + /** 参数范围-180~180;X轴坐标不变,Y轴坐标延顺时针倾斜ay度 */ + skewY(ay: number): Animation; + /** + * 同transform-function matrix + */ + matrix( + a: number, + b: number, + c: number, + d: number, + tx: number, + ty: number + ): Animation; + /** 同transform-function matrix3d */ + matrix3d( + a1: number, + b1: number, + c1: number, + d1: number, + a2: number, + b2: number, + c2: number, + d2: number, + a3: number, + b3: number, + c3: number, + d3: number, + a4: number, + b4: number, + c4: number, + d4: number + ): Animation; + } + //#endregion + + //#region 画布 https://docs.alipay.com/mini/api/ui-canvas + interface ToTempFilePathOptions extends BaseOptions { + x: number; // 画布 x 轴起点,默认为 0 + y: number; // 画布 y 轴起点,默认为 0 + width: number; // 画布宽度,默认为 canvas 宽度 - x + height: number; // 画布高度,默认为 canvas 高度 - y + destWidth: number; // 输出的图片宽度,默认为 width + destHeight: number; // 输出的图片高度,默认为 height + } + type Color = string | number[] | number | CanvasAction; + + interface CanvasAction { + /** + * 创建一个颜色的渐变点。 + * 小于最小 stop 的部分会按最小 stop 的 color 来渲染,大于最大 stop 的部分会按最大 stop 的 color 来渲染。 + * + * @param stop 渐变点位置,值必须在 [0,1] 范围内 + * @param color 颜色值 + */ + addColorStop(stop: number, color: Color): void; + } + + interface TextMetrics { + width: number; + } + + interface ConvasContext { + font: string; + /** + * 把当前画布的内容导出生成图片,并返回文件路径。 + */ + toTempFilePath(options?: Partial): void; + /** + * textAlign 是 Canvas 2D API 描述绘制文本时,文本的对齐方式的属性。注意,该对齐是基于 + * CanvasRenderingContext2D.fillText 方法的x的值。所以如果 textAlign="center",那么该文本将画在 x-50%*width + */ + setTextAlign(textAlign: 'left' | 'right' | 'center' | 'start' | 'end'): void; + /** + * textBaseline 是 Canvas 2D API 描述绘制文本时,当前文本基线的属性。 + */ + setTextBaseline(textBaseline: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom'): void; + /** + * 设置填充色。 + * + * 如果没有设置 fillStyle,则默认颜色为 black。 + */ + setFillStyle(color: Color): void; + /** + * 设置边框颜色。 + * + * 如果没有设置 strokeStyle,则默认颜色为 black。 + */ + setStrokeStyle(color: Color): void; + /** + * 设置阴影样式。 + * 如果没有设置,offsetX 的默认值为 0, offsetY 的默认值为 0, blur 的默认值为 0,color 的默认值为 black。 + * @param offsetX 阴影相对于形状水平方向的偏移 + * @param offsetY 阴影相对于形状竖直方向的偏移 + * @param blur 0~100 阴影的模糊级别,值越大越模糊 + * @param color 阴影颜色 + */ + setShadow(offsetX: number, offsetY: number, blur: number, color: Color): void; + + /** + * 创建一个线性的渐变色。 + * + * @param x0 起点 x 坐标 + * @param y0 起点 y 坐标 + * @param x1 终点 x 坐标 + * @param y1 终点 y 坐标 + */ + createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasAction; + + /** + * 创建一个圆形的渐变色。 + * 起点在圆心,终点在圆环。 + * 需要使用 addColorStop() 来指定渐变点,至少需要两个。 + * @param x 圆心 x 坐标 + * @param y 圆心 y 坐标 + * @param r 圆半径 + * @returns + */ + createCircularGradient(x: number, y: number, r: number): CanvasAction; + + /** + * 设置线条的宽度。 + * @param lineWidth 线条宽度,单位为 px + */ + setLineWidth(lineWidth: number): void; + + /** + * 设置线条的端点样式。 + * + * @param lineCap 线条的结束端点样式 + */ + setLineCap(lineCap: 'round' | 'butt' | 'square'): void; + + /** + * 设置线条的交点样式。 + * + * @param lineJoin 线条的结束交点样式 + */ + setLineJoin(lineJoin: 'round' | 'bevel' | 'miter'): void; + + /** + * 设置最大斜接长度,斜接长度指的是在两条线交汇处内角和外角之间的距离。 当 setLineJoin() 为 miter 时才有效。超过最大倾斜长度的,连接处将以 lineJoin 为 bevel 来显示 + * + * @param miterLimit 最大斜接长度 + */ + setMiterLimit(miterLimit: number): void; + + /** + * 创建一个矩形。 + * + * @param x 矩形左上角的 x 坐标 + * @param y 矩形左上角的 y 坐标 + * @param width 矩形路径宽度 + * @param height 矩形路径高度 + */ + rect(x: number, y: number, width: number, height: number): void; + + /** + * 填充矩形。 + * 用 setFillStyle() 设置矩形的填充色,如果没设置则默认是 black。 + * @param x 矩形左上角的 x 坐标 + * @param y 矩形左上角的 y 坐标 + * @param width 矩形路径宽度 + * @param height 矩形路径高度 + */ + fillRect(x: number, y: number, width: number, height: number): void; + + /** + * 画一个矩形(非填充)。 + * 用 setFillStroke() 设置矩形线条的颜色,如果没设置默认是 black。 + * @param x 矩形左上角的 x 坐标 + * @param y 矩形左上角的 y 坐标 + * @param width 矩形路径宽度 + * @param height 矩形路径高度 + */ + strokeRect(x: number, y: number, width: number, height: number): void; + + /** + * 清除画布上在该矩形区域内的内容。 + * clearRect 并非画一个白色的矩形在地址区域,而是清空,为了有直观感受,可以对 canvas 加了一层背景色。 + * @param x 矩形左上角的 x 坐标 + * @param y 矩形左上角的 y 坐标 + * @param width 矩形路径宽度 + * @param height 矩形路径高度 + */ + clearRect(x: number, y: number, width: number, height: number): void; + + /** + * 对当前路径中的内容进行填充。默认的填充色为黑色。 + * + */ + fill(): void; + + /** + * 画出当前路径的边框。默认 black。 + * stroke() 描绘的的路径是从 beginPath() 开始计算,但是不会将 strokeRect() 包含进去 + */ + stroke(): void; + + /** + * 关闭一个路径 + * 关闭路径会连接起点和终点。 + * 如果关闭路径后没有调用 fill() 或者 stroke() 并开启了新的路径,那之前的路径将不会被渲染。 + */ + beginPath(): void; + + /** + * 关闭一个路径 + * 关闭路径会连接起点和终点。 + * + */ + closePath(): void; + + /** + * 把路径移动到画布中的指定点,不创建线条。 + * 用 stroke() 方法来画线条 + * @param x 目标位置 x 坐标 + * @param y 目标位置 y 坐标 + */ + moveTo(x: number, y: number): void; + + /** + * lineTo 方法增加一个新点,然后创建一条从上次指定点到目标点的线。 + * 用 stroke() 方法来画线条 + * + * @param x 目标位置 x 坐标 + * @param y 目标位置 y 坐标 + */ + lineTo(x: number, y: number): void; + + /** + * 画一条弧线。 + * 创建一个圆可以用 arc() 方法指定其实弧度为0,终止弧度为 2 * Math.PI。 + * + * @param x + * @param y + * @param r + * @param sAngle + * @param eAngle + */ + arc(x: number, y: number, r: number, sAngle: number, eAngle: number): void; + + /** + * 创建三次方贝塞尔曲线路径。 + * 曲线的起始点为路径中前一个点。 + * @param cp1x + * @param cp1y + * @param cp2x + * @param cp2y + * @param x + * @param y + */ + bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + + /** + * 将当前创建的路径设置为当前剪切路径。 + * + */ + clip(): void; + + /** + * 创建二次贝塞尔曲线路径。 + * 曲线的起始点为路径中前一个点。 + * @param cpx 贝塞尔控制点 x 坐标 + * @param cpy 贝塞尔控制点 y 坐标 + * @param x 结束点 x 坐标 + * @param y 结束点 y 坐标 + */ + quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + + /** + * 在调用scale方法后,之后创建的路径其横纵坐标会被缩放。多次调用scale,倍数会相乘。 + * + * @param scaleWidth 横坐标缩放倍数 (1 = 100%,0.5 = 50%,2 = 200%) + * @param scaleHeight 纵坐标轴缩放倍数 (1 = 100%,0.5 = 50%,2 = 200%) + */ + scale(scaleWidth: number, scaleHeight: number): void; + + /** + * 以原点为中心,原点可以用 translate方法修改。顺时针旋转当前坐标轴。多次调用rotate,旋转的角度会叠加。 + * + * @param rotate 旋转角度,以弧度计(degrees * Math.PI/180;degrees 范围为0~360) + */ + rotate(rotate: number): void; + + /** + * 对当前坐标系的原点(0, 0)进行变换,默认的坐标系原点为页面左上角。 + * + * @param x 水平坐标平移量 + * @param y 竖直坐标平移量 + */ + translate(x: number, y: number): void; + + /** + * 设置字体大小。 + * + * @param fontSize 字号 + */ + setFontSize(fontSize: number): void; + + /** + * 在画布上绘制被填充的文本。 + * + * @param text 文本 + * @param x 绘制文本的左上角 x 坐标 + * @param y 绘制文本的左上角 y 坐标 + */ + fillText(text: string, x: number, y: number): void; + + /** + * 绘制图像,图像保持原始尺寸。 + * + * @param imageResource 图片资源, 只支持线上 cdn 地址或离线包地址,线上 cdn 需返回头 Access-Control-Allow-Origin: * + * @param x 图像左上角 x 坐标 + * @param y 图像左上角 y 坐标 + * @param width 图像宽度 + * @param height 图像高度 + */ + drawImage(imageResource: string, x: number, y: number, width: number, height: number): void; + + /** + * 设置全局画笔透明度。 + * + * @param alpha 透明度,0 表示完全透明,1 表示不透明 范围 [0, 1] + */ + setGlobalAlpha(alpha: number): void; + + /** + * 设置虚线的样式 + * + * @param segments 一组描述交替绘制线段和间距(坐标空间单位)长度的数字。 如果数组元素的数量是奇数, 数组的元素会被复制并重复。例如, [5, 15, 25] 会变成 [5, 15, 25, 5, 15, 25]。 + */ + setLineDash(segments: number[]): void; + + /** + * 使用矩阵多次叠加当前变换的方法,矩阵由方法的参数进行描述。你可以缩放、旋转、移动和倾斜上下文。 + * + * @param scaleX 水平缩放 + * @param skewX 水平倾斜 + * @param skewY 垂直倾斜 + * @param scaleY 垂直缩放 + * @param translateX 水平移动 + * @param translateY 垂直移动 + */ + transform(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; + + /** + * 使用单位矩阵重新设置(覆盖)当前的变换并调用变换的方法,此变换由方法的变量进行描述。 + * + * @param scaleX 水平缩放 + * @param skewX 水平倾斜 + * @param skewY 垂直倾斜 + * @param scaleY 垂直缩放 + * @param translateX 水平移动 + * @param translateY 垂直移动 + */ + setTransform(scaleX: number, skewX: number, skewY: number, scaleY: number, translateX: number, translateY: number): void; + + /** + * 保存当前的绘图上下文。 + * + */ + save(): void; + + /** + * 恢复之前保存的绘图上下文。 + */ + restore(): void; + + /** + * 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。 + * 绘图上下文需要由 my.createCanvasContext(canvasId) 来创建。 + * @param [reserve] 本次绘制是否接着上一次绘制,即 reserve 参数为 false 时则在本次调用 drawCanvas绘制之前 native 层应先清空画布再继续绘制;若 reserver 参数为true 时,则保留当前画布上的内容,本次调用drawCanvas绘制的内容覆盖在上面,默认 false + */ + draw(reserve?: boolean): void; + + measureText(text: string): TextMetrics; + } + /** + * 创建 canvas 绘图上下文 + * + * 该绘图上下文只作用于对应 canvasId 的 + */ + function createCanvasContext(canvasId: string): ConvasContext; + //#endregion + + //#region 地图 https://docs.alipay.com/mini/api/ui-map + interface GetCenterLocationOptions extends BaseOptions { + success?(res: { longitude: string; latitude: string; }): void; + } + + interface MapContext extends BaseOptions { + /** + * 获取当前地图中心的经纬度,返回 gcj02 坐标系的值,可以用于 my.openLocation + * + * @param options + */ + getCenterLocation(options: GetCenterLocationOptions): void; + /** + * 将地图中心移动到当前定位点,需要配合 map 组件的 show-location 使用 + */ + moveToLocation(): void; + } + + /** + * 创建并返回一个 map 上下文对象 mapContext。 + * + * @param mapId + * @returns + */ + function createMapContext(mapId: string): MapContext; + + //#endregion + + //#region 键盘 https://docs.alipay.com/mini/api/ui-hidekeyboard + /** + * 隐藏键盘 + * + */ + function hideKeyboard(): void; + //#endregion + + //#region 滚动 https://docs.alipay.com/mini/api/scroll + interface PageScrollToOptions { + scrollTop: number; // 滚动到页面的目标位置,单位 px + } + + /** + * 滚动到页面的目标位置 + * + * @param options + */ + function pageScrollTo(options: PageScrollToOptions): void; + //#endregion + + //#region 节点查询 https://docs.alipay.com/mini/api/selector-query + interface RectArea { + /** 节点的左边界坐标 */ + left: number; + /** 节点的右边界坐标 */ + right: number; + /** 节点的上边界坐标 */ + top: number; + /** 节点的下边界坐标 */ + bottom: number; + /** 节点的宽度 */ + width: number; + /** 节点的高度 */ + height: number; + } + interface NodesRefRect extends RectArea { + /** 节点的ID */ + id: string; + /** 节点的dataset */ + dataset: any; + } + interface NodeRefOffset { + /** 节点的ID */ + id: string; + /** 节点的dataset */ + dataset: any; + /** 节点的水平滚动位置 */ + scrollLeft: number; + /** 节点的竖直滚动位置 */ + scrollTop: number; + } + interface NodesRef { + /** + * 添加节点的布局位置的查询请求,相对于显示区域,以像素为单位。 + * 其功能类似于DOM的getBoundingClientRect。 + * 返回值是nodesRef对应的selectorQuery。 + * 返回的节点信息中,每个节点的位置用 + * left、right、top、bottom、width、height字段描述。 + * 如果提供了callback回调函数,在执行selectQuery的exec方法后 + * 节点信息会在callback中返回。 + */ + boundingClientRect( + callback?: (rect: T) => void + ): SelectorQuery; + /** + * 添加节点的滚动位置查询请求,以像素为单位。 + * 节点必须是scroll-view或者viewport。 + * 返回值是nodesRef对应的selectorQuery。 + * 返回的节点信息中,每个节点的滚动位置用scrollLeft、scrollHeight字段描述。 + * 如果提供了callback回调函数,在执行selectQuery的exec方法后,节点信息会在callback中返回。 + */ + scrollOffset(callback?: (rect: NodeRefOffset) => void): SelectorQuery; + // /** + // * 获取节点的相关信息,需要获取的字段在fields中指定。 + // * 返回值是nodesRef对应的selectorQuery。 + // */ + // fields( + // fields: NodeRefFieldsOptions, + // callback?: (result: any) => void + // ): SelectorQuery; + } + /** + * SelectorQuery对象实例 + */ + interface SelectorQuery { + // /** + // * 将选择器的选取范围更改为自定义组件component内 + // * (初始时,选择器仅选取页面范围的节点,不会选取任何自定义组件中的节点 + // * @version 1.6.0 + // */ + // in(component: Component): SelectorQuery; + /** + * 在当前页面下选择第一个匹配选择器selector的节点,返回一个NodesRef对象实例,可以用于获取节点信息。 + * selector类似于CSS的选择器,但仅支持下列语法。 + * + ID选择器:#the-id + * + class选择器(可以连续指定多个):.a-class.another-class + * + 子元素选择器:.the-parent > .the-child + * + 后代选择器:.the-ancestor .the-descendant + * + 跨自定义组件的后代选择器:.the-ancestor >>> .the-descendant + * + 多选择器的并集:#a-node, .some-other-nodes + */ + select(selector: string): NodesRef; + /** + * 在当前页面下选择匹配选择器selector的节点,返回一个NodesRef对象实例。 + * 与selectorQuery.selectNode(selector)不同的是,它选择所有匹配选择器的节点。 + */ + selectAll(selector: string): NodesRef; + /** + * 选择显示区域,可用于获取显示区域的尺寸、滚动位置等信息 + * 返回一个NodesRef对象实例。 + */ + selectViewport(): NodesRef; + /** + * 执行所有的请求 + * 请求结果按请求次序构成数组,在callback的第一个参数中返回。 + */ + exec(callback?: (result: any[]) => void): void; + } + /** + * 获取一个节点查询对象 SelectorQuery。 + * + * @param page 可以指定 page 属性,默认为当前页面 + * @returns + */ + function createSelectorQuery(page?: any): SelectorQuery; + //#endregion + + //#region 级联选择 https://docs.alipay.com/mini/api/ewdxl3 + interface MultiLevelSelectItem { + name: string; + subList?: MultiLevelSelectItem[]; + } + interface MultiLevelSelectOptions extends BaseOptions { + title?: string; // 标题 + list?: MultiLevelSelectItem[]; // 选择数据列表 + name?: string; // 条目名称 + subList?: MultiLevelSelectItem[]; // 子条目列表 + success?(res: { + success: boolean; // 是否选择完成,取消返回false + result: MultiLevelSelectItem[]; // 选择的结果,如[{“name”:”杭州市”},{“name”:”上城区”},{“name”:”古翠街道”}] + }): void; + } + + function multiLevelSelect(options?: MultiLevelSelectOptions): void; + //#endregion +} + +// 开放接口 +declare namespace my { + //#region 用户授权 https://docs.alipay.com/mini/api/openapi-authorize + interface GetAuthCodeOptions extends BaseOptions { + scopes?: string | string[]; // 授权类型,默认 auth_base。支持 auth_base(静默授权)/ auth_user(主动授权) / auth_zhima(芝麻信用) + success?(res: { + authCode: string; // 授权码 + authErrorScope: { + [scope: string]: number; + }; // 失败的授权类型,key是授权失败的 scope,value 是对应的错误码 + authSucessScope: string[]; // 成功的授权 scope + }): void; + } + /** + * 获取授权码。 + * 详细用户授权接入参考 [指引](https://docs.alipay.com/mini/introduce/auth)。 + */ + function getAuthCode(options: GetAuthCodeOptions): void; + //#endregion + + //#region 客户端获取会员信息 https://docs.alipay.com/mini/api/userinfo + interface GetAuthUserInfoOptions extends BaseOptions { + success?(res: { + nickName: string; // 用户昵称 + avatar: string; // 用户头像链接 + }): void; + } + /** + * 客户端获取会员信息 + * 获取会员信息首先需要获取用户授权,详细会员信息获取参考[指引](https://docs.alipay.com/mini/introduce/auth),采用 jsapi 调用的方式。 + */ + function getAuthUserInfo(options: GetAuthUserInfoOptions): void; + //#endregion + + //#region 小程序唤起支付 https://docs.alipay.com/mini/api/openapi-pay + interface TradePayOptions extends BaseOptions { + tradeNO?: string; // 接入小程序支付时传入此参数。此参数为支付宝交易号 + success?(res: { + // resultCode | 描述 + // -----------|------ + // 9000 | 订单支付成功 + // 8000 | 正在处理中 + // 4000 | 订单支付失败 + // 6001 | 用户中途取消 + // 6002 | 网络连接出错 + // 6004 | 支付结果未知(有可能已经支付成功),请查询商户订单列表中订单的支付状态 + // 99 | 用户点击忘记密码导致快捷界面退出(only iOS) + resultCode: string; + }): void; + } + /** + * 发起支付。 + * 详细接入支付方式参考[指引](https://docs.alipay.com/mini/introduce/pay)。 + * @param options + */ + function tradePay(options: TradePayOptions): void; + //#endregion + + //#region 支付代扣签约 https://docs.alipay.com/mini/api/pay-sign + interface PaySignCenterOptions extends BaseOptions { + signStr: string; // 签约字符串 + } + + /** + * 签约中心 + * + * 返回码 | 含义 + * ------|------ + * 7000 | 协议签约成功 + * 7001 | 签约结果未知(有可能已经签约成功),请根据外部签约号查询签约状态 + * 7002 | 协议签约失败 + * 6001 | 用户中途取消 + * 6002 | 网络连接错误 * @param options + */ + function paySignCenter(options: PaySignCenterOptions): void; + //#endregion + + //#region 小程序二维码 https://docs.alipay.com/mini/api/openapi-qrcode + // @see https://docs.alipay.com/mini/api/openapi-qrcode + // @see https://docs.alipay.com/mini/introduce/qrcode + //#endregion + + //#region 跳转支付宝卡包 https://docs.alipay.com/mini/api/card-voucher-ticket + /** + * 打开支付宝卡列表。 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openCardList(): void; + interface OpenMerchantCardList extends BaseOptions { + partnerId: string; // 商户编号 + } + + /** + * 打开支付宝卡列表。 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + * @param options + */ + function openMerchantCardList(options: OpenMerchantCardList): void; + + interface OpenCardDetailOptions extends BaseOptions { + passId: string; // 卡实例Id + } + /** + * 打开当前用户的某张卡的详情页 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + * + * passId获取方式: + * 1)通过alipass创建的卡 + * 调用alipay.pass.instance.add(支付宝pass新建卡券实例接口)接口,在出参“result”中可获取 + * 2)通过会员卡创建的卡 + * 调用alipay.marketing.card.query(会员卡查询)接口,在schema_url中可获取,具体参数为“p=xxx”,xxx即为passId。 + */ + function openCardDetail(options: OpenCardDetailOptions): void; + + /** + * 打开支付宝券列表 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + * + * @param options + */ + function openVoucherList(): void; + + interface OpenMerchantVoucherListOptions extends BaseOptions { + partnerId: string; // 商户编号 + } + /** + * 打开当前用户的某个商户的券列表 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openMerchantVoucherList(options: OpenMerchantVoucherListOptions): void; + + interface OpenVoucherDetailOptions1 extends BaseOptions { + passId: string; // 券实例Id,调用券发放接口可以获取该参数(如果传入了partnerId和serialNumber则不需传入) + } + interface OpenVoucherDetailOptions2 extends BaseOptions { + partnerId: string; // 商户编号,以 2088 为开头(如果传入了passId则不需传入) + serialNumber: string; // 序列号,调用新建卡券模板可以获取该参数(如果传入了passId则不需传入) + } + /** + * 打开当前用户的某张券的详情页(非口碑) + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openVoucherDetail(options: OpenVoucherDetailOptions1 | OpenVoucherDetailOptions2): void; + + interface OpenKBVoucherDetailOptions1 extends BaseOptions { + passId: string; // 卡实例Id(如果传入了partnerId和serialNumber则不需传入) + } + interface OpenKBVoucherDetailOptions2 extends BaseOptions { + partnerId: string; // 商户编号(如果传入了passId则不需传入) + serialNumber: string; // 序列号(如果传入了passId则不需传入) + } + /** + * 打开当前用户的某张券的详情页(口碑) + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openKBVoucherDetail(options: OpenKBVoucherDetailOptions1 | OpenKBVoucherDetailOptions2): void; + + /** + * 打开支付宝票列表。 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openTicketList(): void; + + interface OpenMerchantTicketListOptions extends BaseOptions { + partnerId: string; // 商户编号 + } + /** + * 打开某个商户的票列表 + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openMerchantTicketList(options: OpenMerchantTicketListOptions): void; + + interface OpenTicketDetailOptions1 extends BaseOptions { + passId: string; // 卡实例Id(如果传入了partnerId和serialNumber则不需要传入passId) + } + interface OpenTicketDetailOptions2 extends BaseOptions { + partnerId: string; // 商户编号(如果传入了passId则不需要传入partnerId) + serialNumber: string; // 序列号(如果传入了passId则不需要传入serialNumber) + } + /** + * 打开当前用户的某张票的详情页 + * + * 有关支付宝卡包详细功能,见[支付宝卡包产品介绍](https://docs.alipay.com/mini/introduce/voucher) + */ + function openTicketDetail(options: OpenTicketDetailOptions1 | OpenTicketDetailOptions2): void; + //#endregion + + //#region 会员开卡授权 https://docs.alipay.com/mini/api/add-card-auth + interface AddCardAuthResult { + success: true | boolean; // true 表示领卡成功 + resultStatus: string; // 9000 表示成功 + result: { + app_id: string; // 应用id + auth_code: string; // 授权码,用于换取authtoken + state: string; // 授权的state + scope: string; // 授权scope + template_id: string; // 会员卡模板Id + request_id: string; // 会员卡表单信息请求Id + out_string: string; // 会员卡领卡链接透传参数 + }; + } + interface AddCardAuthResult { + success: false | boolean; // false 表示领卡失败 + /** + * 失败的错误码 + * 领卡失败 code 说明 + * 名称 | 类型 | 说明 + * -----|-----|----- + * JSAPI_SERVICE_TERMINATED | String | 用户取消 + * JSAPI_PARAM_INVALID | String | url 为空或非法参数 + * JSAPI_SYSTEM_ERROR | String | 系统错误 + */ + code: string; + } + interface AddCardAuthOptions extends BaseOptions { + /** + * 开卡授权的页面地址,从alipay.marketing.card.activateurl.apply接口获取 + */ + url: string; + success?(res: AddCardAuthResult): void; + } + /** + * 小程序唤起会员开卡授权页面,小程序接入会员卡[点此查看](https://docs.alipay.com/mini/introduce/card) + */ + function addCardAuth(options: AddCardAuthOptions): void; + //#endregion + + //#region 芝麻认证 https://docs.alipay.com/mini/api/zm-service + interface StartZMVerifyOptions extends BaseOptions { + bizNo: string; // 认证标识 + success?(res: { + token: string; // 认证标识 + passed: string; // 认证是否通过 + reason?: string; // 认证不通过原因 + }): void; + } + /** + * 芝麻认证接口,调用此接口可以唤起芝麻认证页面并进行人脸身份验证。 + * 有关芝麻认证的产品和接入介绍,详见 [芝麻认证](https://docs.alipay.com/mini/introduce/zm-verify)。 + * 需要通过蚂蚁开发平台,调用certification.initialize接口进行[认证初始化](https://docs.alipay.com/zmxy/271/105914)。获得biz_no 后,方能通过以下接口激活芝麻认证小程序。 + */ + function startZMVerify(options: StartZMVerifyOptions): void; + //#endregion + + //#region 信用借还 https://docs.alipay.com/mini/api/zmcreditborrow + interface ZMCreditBorrowOptions extends BaseOptions { + /** + * 外部订单号,需要唯一,由商户传入,芝麻内部会做幂等控制,格式为:yyyyMMddHHmmss+随机数 + * + */ + out_order_no: string; + /** + * 信用借还的产品码,传入固定值:w1010100000000002858 + */ + product_code: string; + /** + * 物品名称,最长不能超过14个汉字 + */ + goods_name: string; + /** + * 租金单位,租金+租金单位组合才具备实际的租金意义。 + * 取值定义如下: + * DAY_YUAN: 元 / 天 + * HOUR_YUAN: 元 / 小时 + * YUAN: 元 + * YUAN_ONCE: 元 / 次 + */ + rent_unit: string; + /** + * 租金,租金 + 租金单位组合才具备实际的租金意义。 + * > 0.00元,代表有租金 + * = 0.00元,代表无租金,免费借用 + * 注:参数传值必须 >= 0,传入其他值会报错参数非法 + */ + rent_amount: string; + /** + * 押金,金额单位:元。 + * 注:不允许免押金的用户按此金额支付押金;当物品丢失时,赔偿金额不得高于该金额。 + */ + deposit_amount: string; + /** + * 该字段目前默认传Y; + * 是否支持当借用用户信用不够(不准入)时,可让用户支付押金借用: + * Y: 支持 + * N: 不支持 + * 注:支付押金的金额等同于deposit_amount。 + */ + deposit_state?: string; // 该字段目前默认传Y; + /** + * 回调到商户的小程序schema地址。说明:商户的回调地址可以在商户后台里进行配置,服务端回调时,首先根据参数:invoke_type 查询是否有对应的配置地址,如果有,则使用已定义的地址,否则,使用该字段定义的地址执行回调; + * 参考表格下方的说明一; + * 小程序回调地址参考表格下方的说明三; + * 说明一: + * 支付宝商户账号登录我的商家服务打开入口链接; + * 商家服务中选择“您可能需要->信用借还”或者点击链接; + * 场景ID配置->配置新ID,选择对应的业务类型、服务类目和联盟,将生成的场景ID作为credit_biz的值传入即可; + * 回调地址配置->设置小程序回调地址,注意:若设置了该回调地址,则接口my.zmCreditBorrow中的入参invoke_return_url将会失效,以该处设置为准; + * 说明三: + * 小程序回调地址示例一:alipays://platformapi/startapp?appId=1999; + * 小程序回调地址示例二:alipays://platformapi/startapp?appId=1999&page=pages/map; + */ + invoke_return_url?: string; + /** + * 商户访问蚂蚁的对接模式,默认传TINYAPP: + * TINYAPP:回跳至小程序地址; + * WINDOWS:支付宝服务窗,默认值; + */ + invoke_type?: 'TINYAPP' | 'TINYAPP' | 'WINDOWS' | string; + /** + * 信用业务服务,注意:该字段不能为空,且必须根据说明的指引配置商户专属的场景ID,商户自助接入时,登录后台可配置场景ID,将后台配置的场景ID作为该字段的输入; + * 参考说明一自助进行配置; + */ + credit_biz: string; + /** + * 商户订单创建的起始借用时间,格式:YYYY - MM - DD HH: MM: SS。如果不传入或者为空,则认为订单创建起始时间为调用此接口时的时间。 + */ + borrow_time?: string; + /** + * 到期时间,不允许为空,请根据实际业务合理设置该值,格式:YYYY - MM - DD HH: MM: SS,是指最晚归还时间,表示借用用户如果超过此时间还未完结订单(未归还物品或者未支付租金)将会进入逾期状态,芝麻会给借用用户发送催收提醒;需要晚于borrow_time。 + */ + expiry_time: string; + /** + * 借用用户的手机号码,可选字段。推荐商户传入此值,会将此手机号码与用户身份信息进行匹配验证,防范欺诈风险。 + */ + mobile_no?: string; + /** + * 物品借用地点的描述,便于用户知道物品是在哪里借的。可为空 + * + */ + borrow_shop_name?: string; + /** + * 租金的结算方式,非必填字段,默认是支付宝租金结算支付 merchant:表示商户自行结算,信用借还不提供租金支付能力; alipay:表示使用支付宝支付功能,给用户提供租金代扣及赔偿金支付能力; + * + */ + rent_settle_type?: 'merchant' | 'alipay' | string; + /** + * 商户请求状态上下文。商户发起借用服务时,需要在借用结束后返回给商户的参数,格式:json; + * 如果json的某一项值包含中文,请使用encodeURIComponent对该值进行编码; + * @example + * var ext = { + * name: encodeURIComponent('名字') + * }; + * var obj = { + * invoke_state: JSON.stringify(ext) + * } + */ + invoke_state?: string; + /** + * 租金信息描述, 长度不超过14个汉字,只用于页面展示给C端用户,除此之外无其他意义。 + */ + rent_info?: string; + /** + * 借用用户的真实姓名,非必填字段。但name和cert_no必须同时非空,或者同时为空,一旦传入会对用户身份进行校验。 + */ + name?: string; + /** + * 借用用户的真实身份证号,非必填字段。但name和cert_no必须同时非空,或者同时为空,一旦传入会对用户身份进行校验。 + */ + cert_no?: string; + /** + * 借用用户的收货地址,可选字段,最大长度128。推荐商户传入此值,会将此手机号码与用户身份信息进行匹配验证,防范欺诈风险。 + */ + address?: string; + success?(res: { + /** + * 6001 用户取消了业务流程 + * 6002 网络异常 + * 9000 成功 + * 4000 系统异常 + */ + resultStatus: '6001' | '6002' | '9000' | '4000' | string; + result: { + /** + * 商户发起借用服务时传入的参数,需要在借用结束后返回给商户的参数 + * @example + * {"user_name":"john"} + */ + invoke_state: string; + /** + * 外部订单号,需要唯一,由商户传入,芝麻内部会做幂等控制,格式为:yyyyMMddHHmmss+4位随机数 + * @example + * 201610010000283627 + */ + out_order_no: string; + /** + * 芝麻信用借还订单号 + * @example + * 10020027631 + */ + order_no: string; + /** + * 是否准入:Y:准入;N:不准入(该字段目前无实际意义) + */ + admit_state: 'Y' | 'N' | string; + /** + * 物品借用/租赁者的用户id + * @example + * 2088202924240029 + */ + user_id: string; + callbackData: any; // todo only in example + } + }): void; + } + function zmCreditBorrow(options: ZMCreditBorrowOptions): void; + //#endregion + + //#region 文本风险识别 https://docs.alipay.com/mini/api/text-identification + type TextRiskIdentificationType = 'keyword' | '0' | '1' | '2' | '3' | string; + interface TextRiskIdentificationOptions extends BaseOptions { + /** + * 需要进行风险识别的文本内容 + */ + content: string; + /** + * 识别类型:keyword 表示关键词、0 表示广告、1表示涉政、2表示涉黄、3表示低俗辱骂 + */ + type: TextRiskIdentificationType[]; + success?(res: { + result: { + /** + * 目标内容文本识别到的类型,keyword 表示关键词、0 表示广告、1表示涉政、2表示涉黄、3表示低俗辱骂 + */ + type: TextRiskIdentificationType; + /** + * 仅当识别命中了 type 为 keyword 时,才会返回该字段 + */ + hitKeywords?: string[]; + /** + * 识别命中得分,最高分100分。仅当识别没有命中 keyword ,但入参中包含了广告或涉政或涉黄时,才会返回该字段 + */ + score?: string; + }; + fail?(res: { + /** + * 识别错误码 + */ + error: string; + /** + * 识别错误消息 + */ + errorMessage: string; + }): void; + }): void; + } + /** + * 文本风险识别, **支付宝客户端10.1.10及以上版本支持。**详细接入参考[指引](https://docs.alipay.com/mini/introduce/text-identification) + */ + function textRiskIdentification(options: TextRiskIdentificationOptions): void; + //#endregion + + //#region 小程序跳转 https://docs.alipay.com/mini/api/open-miniprogram + interface NavigateToMiniProgramOptions extends BaseOptions { + /** + * 要跳转的目标小程序appId + */ + appId: string; + /** + * 打开的页面路径,如果为空则打开首页 + */ + path?: string; + /** + * 需要传递给目标小程序的数据,目标小程序可在 App.onLaunch() ,App.onShow() 中获取到这份数据 + */ + extraData?: any; + /** + * 要打开的小程序版本,有效值 develop(开发版),trial(体验版),release(正式版) ,仅在当前小程序为开发版或体验版时此参数有效;如果当前小程序是正式版,则打开的小程序必定是正式版。默认值 release + */ + envVersion?: 'develop' | 'trial' | 'release' | string; + } + /** + * 跳转到其他小程序。详细接入参考[指引](https://docs.alipay.com/mini/introduce/open-miniprogram) + * @param options + */ + function navigateToMiniProgram(options: NavigateToMiniProgramOptions): void; + interface NavigateBackMiniProgramOptions extends BaseOptions { + /** + * 需要传递给目标小程序的数据,目标小程序可在 App.onLaunch(),App.onShow() 中获取到这份数据 + */ + extraData?: any; + } + /** + * 跳转回上一个小程序,只有当另一个小程序跳转到当前小程序时才会能调用成功 + */ + function navigateBackMiniProgram(options: NavigateBackMiniProgramOptions): void; + //#endregion + + //#region webview组件控制 https://docs.alipay.com/mini/api/webview-context + interface WebViewContext { + postMessage(param: any): void; + } + /** + * 创建并返回 web-view 上下文 webViewContext 对象。 + * + * @param webviewId 要创建的web-view所对应的id属性 + */ + function createWebViewContext(webviewId: string): WebViewContext; + //#endregion +} + +// 多媒体 +declare namespace my { + //#region 图片 https://docs.alipay.com/mini/api/media-image + type ImageSourceType = "album" | "camera"; + interface ChooseImageOptions extends BaseOptions { + /** 最大可选照片数,默认1张 */ + count: number; + /** 相册选取或者拍照,默认 [‘camera’,‘album’] */ + sourceType: ImageSourceType[]; + /** 成功则返回图片的本地文件路径列表 tempFilePaths */ + success(res: { + /** + * 图片文件描述 + */ + apFilePaths: string[]; + }): void; + } + /** + * 从本地相册选择图片或使用相机拍照。 + */ + function chooseImage(options: Partial): void; + + interface PreviewImageOptions extends BaseOptions { + /** 当当前显示图片索引,默认 0 */ + current?: number; + /** 要预览的图片链接列表 */ + urls: string[]; + } + /** + * 预览图片。 + */ + function previewImage(options: PreviewImageOptions): void; + + interface SaveImageOptions extends BaseOptions { + /** + * 要保存的图片链接 + */ + url: string; + success?(res: { errMsg: string }): void; + } + /** + * 保存在线图片到手机相册。 + */ + function saveImage(options: SaveImageOptions): void; + + interface CompressImageOptions extends BaseOptions { + /** + * 要压缩的图片地址数组 + */ + apFilePaths: string[]; + /** + * 压缩级别,支持 0 ~ 4 的整数,默认 4。详见「compressLevel表 说明表」 + * compressLevel表 + * compressLevel | 说明 + * --------------|----- + * 0 | 低质量 + * 1 | 中等质量 + * 2 | 高质量 + * 3 | 不压缩 + * 4 | 根据网络适应 + */ + compressLevel?: 0 | 1 | 2 | 3 | 4; + success?(res: { + /** + * 压缩后的路径数组 + */ + apFilePaths: string[]; + }): void; + } + /** + * 压缩图片。扫码体验: + */ + function compressImage(options: CompressImageOptions): void; + + interface GetImageInfoOptions extends BaseOptions { + /** + * 图片路径,目前支持: + * - 网络图片路径 + * - apFilePath路径 + * - 相对路径 + */ + src: string; + success?(res: { + width: number; // 图片宽度(单位px) + height: number; // 图片高度(单位px) + path: string; // 图片本地路径 + }): void; + } + /** + * 获取图片信息 + */ + function getImageInfo(options: GetImageInfoOptions): void; + //#endregion +} + +// 缓存 +declare namespace my { + //#region 缓存 https://docs.alipay.com/mini/api/storage + interface SetStorageOptions extends BaseOptions { + /** 本地缓存中的指定的 key */ + key: string; + /** 需要存储的内容 */ + data: any | string; + } + /** + * 将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的数据。 + * 这是异步接口。 + */ + function setStorage(options: SetStorageOptions): void; + + /** + * 同步将数据存储在本地缓存中指定的 key 中。 + * 这是同步接口。 + * + * @param key 本地缓存中的指定的 key + * @param data 需要存储的内容 + */ + function setStorageSync(options: { key: string, data: any | string }): void; + + interface GetStorageOptions extends BaseOptions { + /** 本地缓存中的指定的 key */ + key: string; + /** 接口调用的回调函数,res = {data: key对应的内容} */ + success(res: DataResponse): void; + } + /** + * 获取缓存数据。 + * 这是异步接口。 + */ + function getStorage(options: GetStorageOptions): void; + + /** + * 同步获取缓存数据。 + * 这是同步接口 + */ + function getStorageSync(options: { key: string; }): any | string; + + interface RemoveStorageOptions extends BaseOptions { + key: string; + } + /** + * 删除缓存数据。 + * 这是异步接口。 + */ + function removeStorage(options: RemoveStorageOptions): void; + + /** + * 同步删除缓存数据。 + * 这是同步接口。 + * @param key 缓存数据的key + */ + function removeStorageSync(options: { key: string; }): void; + + /** + * 清除本地数据缓存。 + * 这是异步接口。 + */ + function clearStorage(): void; + + /** + * 同步清除本地数据缓存。 + * 这是同步接口。 + */ + function clearStorageSync(): void; + + interface StorageInfo { + /** + * 当前storage中所有的key + */ + keys: string[]; + /** + * 当前占用的空间大小, 单位kb + */ + currentSize: number; + /** + * 限制的空间大小,单位kb + */ + limitSize: number; + } + interface GetStorageInfoOptions extends BaseOptions { + success(res: StorageInfo): void; + } + /** + * 异步获取当前storage的相关信息 + */ + function getStorageInfo(options: GetStorageInfoOptions): void; + + function getStorageInfoSync(): StorageInfo; + //#endregion +} + +// 文件 +declare namespace my { + //#region 文件 https://docs.alipay.com/mini/api/file + interface SavedFileData { + /** 文件保存路径 */ + apFilePath: string; + } + interface SaveFileOptions extends BaseOptions { + /** 文件路径 */ + apFilePath: string; + success?(res: SavedFileData): void; + } + /** + * 保存文件到本地(本地文件大小总容量限制:10M) + */ + function saveFile(options: SaveFileOptions): void; + + interface GetFileInfoSuccess { + /** 文件大小,单位:B */ + size: number; + /** 摘要结果 */ + digest: string; + } + interface GetFileInfoOptions extends BaseOptions { + /** 文件路径 */ + apFilePath: string; + /** 摘要算法,支持md5和sha1,默认为md5 */ + digestAlgorithm?: 'md5' | 'sha1'; + success?(options: GetFileInfoSuccess): void; + } + /** + * 获取文件信息 + * 基础库版本 1.4.0 开始支持,低版本需做兼容处理 + */ + function getFileInfo(options: GetFileInfoOptions): void; + + interface SavedFileInfoData { + /** + * 文件大小,单位B + */ + size: number; + /** + * 创建时间 + */ + createTime: number; + } + interface GetSavedFileInfoOptions extends BaseOptions { + /** 文件路径 */ + apFilePath: string; + /** 接口调用成功的回调函数 */ + success?(res: SavedFileInfoData): void; + } + /** + * 获取保存的文件信息 + */ + function getSavedFileInfo(options: GetSavedFileInfoOptions): void; + + interface GetSavedFileListOptions extends BaseOptions { + success?(res: { + fileList: Array<{ + /** 文件大小 */ + size: number; + /** 创建时间 */ + createTime: number; + /** 文件路径 */ + apFilePath: string; + }> + }): void; + } + function getSavedFileList(options: GetSavedFileListOptions): void; + + type RemoveSavedFileOptions = GetSavedFileInfoOptions; + /** + * 删除某个保存的文件 + */ + function removeSavedFile(options: RemoveSavedFileOptions): void; + //#endregion +} + +// 位置 +declare namespace my { + //#region 位置 https://docs.alipay.com/mini/api/location + interface LocationData { + /** 经度 */ + longitude: string; + /** 纬度 */ + latitude: string; + /** 精确度,单位m */ + accuracy: string; + /** + * 水平精确度,单位m + */ + horizontalAccuracy: string; + /** + * 国家(type>0生效) + */ + country?: string; + /** + * 国家编号 (type>0生效) + */ + countryCode?: string; + /** + * 省份(type>0生效) + */ + province?: string; + /** + * 城市(type>0生效) + */ + city?: string; + /** + * 城市级别的地区代码(type>0生效) + */ + cityAdcode?: string; + /** + * 区县(type>0生效) + */ + district?: string; + /** + * 区县级别的地区代码(type>0生效) + */ + districtAdcode?: string; + /** + * 需要街道级别逆地理的才会有的字段,街道门牌信息,结构是:{ street, number } (type > 1生效) + */ + streetNumber?: { + street: string; + number: string; + }; + /** + * 需要POI级别逆地理的才会有的字段, 定位点附近的 POI 信息,结构是:{ name, address } (type > 2生效) + */ + pois?: Array<{ + name: string; + address: string; + }>; + } + interface GetLocationOptions extends BaseOptions { + /** + * 支付宝客户端经纬度定位缓存过期时间,单位秒。默认 30s。使用缓存会加快定位速度,缓存过期会重新定位 + */ + cacheTimeout: number; + /** + * 0:默认,获取经纬度 + * 1:获取经纬度和详细到区县级别的逆地理编码数据 + * 2:获取经纬度和详细到街道级别的逆地理编码数据,不推荐使用 + * 3:获取经纬度和详细到POI级别的逆地理编码数据,不推荐使用 + */ + type: 0 | 1 | 2 | 3; + /** 接口调用成功的回调函数,返回内容详见返回参数说明。 */ + success(res: LocationData): void; + } + /** + * 获取用户当前的地理位置信息 + */ + function getLocation(options: Partial): void; + + interface OpenLocationOptions extends BaseOptions { + /** 经度 */ + longitude: number | string; + /** 纬度 */ + latitude: number | string; + /** 位置名称 */ + name: string; + /** 地址的详细说明 */ + address: string; + /** 缩放比例,范围 3~19,默认为 15 */ + scale?: number; + } + /** + * 使用微信内置地图查看位置 + */ + function openLocation(options: OpenLocationOptions): void; + + interface ChooseLocationData { + /** + * 位置名称 + */ + name: string; + /** + * 详细地址 + */ + address: string; + /** + * 纬度,浮点数,范围为-90~90,负数表示南纬 + */ + latitude: number; + /** + * 经度,浮点数,范围为-180~180,负数表示西经 + */ + longitude: number; + } + interface ChooseLocationOptions extends BaseOptions { + success(res: ChooseLocationData): void; + } + /** + * 使用支付宝内置地图选择地理位置。 + */ + function chooseLocation(options: ChooseLocationOptions): void; + //#endregion +} + +// 网络 +declare namespace my { + //#region 网络 https://docs.alipay.com/mini/api/network + interface RequestHeader { + [key: string]: string; + } + interface RequestOptions extends BaseOptions { + /** 目标服务器url */ + url: string; + /** 设置请求的 HTTP 头,默认 {'Content-Type': 'application/x-www-form-urlencoded'} */ + header?: RequestHeader; + /** 默认GET,目前支持GET,POST */ + method?: "GET" | "POST"; + /** 请求的参数 */ + data?: string | ArrayBuffer | any; + /** + * 超时时间,单位ms,默认30000 + */ + timeout?: number; + /** 期望返回的数据格式,默认json,支持json,text,base64 */ + dataType?: 'json' | 'text' | 'base64'; + /** 收到开发者服务成功返回的回调函数,res = {data: '开发者服务器返回的内容'} */ + success?(res: DataResponse): void; + } + function httpRequest(options: RequestOptions): void; + + interface UploadFileOptions extends BaseOptions { + /** 开发者服务器地址 */ + url: string; + /** 要上传文件资源的本地定位符 */ + filePath: string; + /** 文件名,即对应的 key, 开发者在服务器端通过这个 key 可以获取到文件二进制内容 */ + fileName: string; + /** + * 文件类型 + */ + fileType: 'image' | 'video' | 'audio'; + /** HTTP 请求 Header */ + header?: RequestHeader; + /** HTTP 请求中其他额外的 form 数据 */ + formData?: any; + success?(res: { + /** 服务器返回的数据 */ + data: string; + /** HTTP 状态码 */ + statusCode: string; + header: any; + }): void; + } + /** + * 上传本地资源到开发者服务器。 + */ + function uploadFile(options: UploadFileOptions): void; + + interface DownloadFileOptions extends BaseOptions { + /** 下载文件地址 */ + url: string; + /** HTTP 请求 Header */ + header?: RequestHeader; + /** 下载成功后以 tempFilePath 的形式传给页面,res = {tempFilePath: '文件的临时路径'} */ + success?(res: TempFileResponse): void; + } + /** + * 下载文件资源到本地。 + */ + function downloadFile(options: DownloadFileOptions): void; + + interface ConnectSocketOptions extends BaseOptions { + /** 目标服务器url */ + url: string; + /** 请求的参数 */ + data?: any; + /** 设置请求的头部 */ + header?: RequestHeader; + method?: 'GET' | 'POST'; // todo missing in api + } + /** + * 创建一个 WebSocket 的连接; + * 一个支付宝小程序同时只能保留一个 WebSocket 连接,如果当前已存在 WebSocket 连接,会自动关闭该连接,并重新创建一个新的 WebSocket 连接。 + */ + function connectSocket(options: ConnectSocketOptions): void; + + /** + * 监听WebSocket连接打开事件。 + */ + function onSocketOpen(callback: () => void): void; + + /** + * 监听WebSocket关闭。 + */ + function onSocketClose(callback: () => void): void; + + /** + * 取消监听WebSocket连接打开事件。 + */ + function offSocketOpen(callback: () => void): void; + + /** + * 监听WebSocket错误。 + */ + function onSocketError(callback: (error: any) => void): void; + + /** + * 取消监听WebSocket错误。 + */ + function offSocketError(callback: (error: any) => void): void; + + interface SendSocketMessageOptions extends BaseOptions { + /** + * 需要发送的内容:普通的文本内容 String 或者经 base64 编码后的 String + */ + data: string | ArrayBuffer; + /** + * 如果需要发送二进制数据,需要将入参数据经 base64 编码成 String 后赋值 data,同时将此字段设置为true,否则如果是普通的文本内容 String,不需要设置此字段 + */ + isBuffer?: boolean; + } + /** + * 通过 WebSocket 连接发送数据,需要先使用 my.connectSocket 发起建连,并在 my.onSocketOpen 回调之后再发送数据。 + */ + function sendSocketMessage(options: SendSocketMessageOptions): void; + + /** + * 监听WebSocket接受到服务器的消息事件。 + */ + function onSocketMessage(callback: (res: { + /** + * 需要发送的内容:普通的文本内容 String 或者经 base64 编码后的 String + */ + data: string | ArrayBuffer; + /** + * 如果需要发送二进制数据,需要将入参数据经 base64 编码成 String 后赋值 data,同时将此字段设置为true,否则如果是普通的文本内容 String,不需要设置此字段 + */ + isBuffer?: boolean; + }) => void): void; + function offSocketMessage(callback: (error: any) => void): void; + + interface CloseSocketOptions extends BaseOptions { + success?(res: any): void; + } + /** + * 监听WebSocket关闭。 + */ + function closeSocket(options?: CloseSocketOptions): void; + + /** + * 取消监听WebSocket关闭。 + */ + function offSocketClose(callback: (error: any) => void): void; + //#endregion +} + +// 设备 +declare namespace my { + //#region canIUse https://docs.alipay.com/mini/api/can-i-use + /** + * 判断当前小程序的 API、入参或返回值、组件、属性等在当前版本是否支持。 + * 参数使用 ${API}.${type}.${param}.${option} 或者 ${component}.${attribute}.${option} 方式来调用 + * - API 表示 api 名字 + * - type 取值 object/return/callback 表示 api 的判断类型 + * - param 表示参数的某一个属性名 + * - option 表示参数属性的具体属性值 + * - component 表示组件名称 + * - attribute 表示组件属性名 + * - option 表示组件属性值 + */ + function canIUse(api: string): boolean; + //#endregion + + //#region 获取基础库版本号 https://docs.alipay.com/mini/api/sdk-version + const SDKVersion: string; + //#endregion + //#region 系统信息 https://docs.alipay.com/mini/api/system-info + interface SystemInfo { + /** + * 手机型号 + */ + model: string; + /** + * 设备像素比 + */ + pixelRatio: number; + /** + * 窗口宽度 + */ + windowWidth: number; + /** + * 窗口高度 + */ + windowHeight: number; + /** + * 支付宝设置的语言 + */ + language: string; + /** + * 支付宝版本号 + */ + version: string; + /** + * 设备磁盘容量 + */ + storage: string; + /** + * 当前电量百分比 + */ + currentBattery: string; + /** + * 系统版本 + */ + system: string; + /** + * 系统名:Android,iOS + */ + platform: 'Android' | 'iOS' | string; + /** + * 屏幕宽度 + */ + screenWidth: number; + /** + * 屏幕高度 + */ + screenHeight: number; + /** + * 手机品牌 + */ + brand: string; + /** + * 用户设置字体大小 + */ + fontSizeSetting: number; + /** + * 当前运行的客户端,当前是支付宝则有效值是"alipay" + */ + app: 'alipay' | string; + } + interface GetSystemInfoOptions extends BaseOptions { + success?(res: SystemInfo): void; + } + function getSystemInfo(options: GetSystemInfoOptions): void; + function getSystemInfoSync(): SystemInfo; + //#endregion + + //#region 网络状态 https://docs.alipay.com/mini/api/network-status + interface GetNetworkTypeOptions extends BaseOptions { + success?(res: { + /** 网络是否可用 */ + networkAvailable: boolean; + /** 网络类型值 UNKNOWN / NOTREACHABLE / WIFI / 3G / 2G / 4G / WWAN */ + networkType: NetworkType; + }): void; + } + type NetworkType = 'UNKNOWN' | 'NOTREACHABLE' | 'WIFI' | '3G' | '2G' | '4G' | 'WWAN'; + function getNetworkType(options: GetNetworkTypeOptions): void; + + /** + * 开始网络状态变化的监听 + */ + function onNetworkStatusChange(callback: (res: { + /** 网络是否可用 */ + isConnected: boolean; + /** 网络类型值 UNKNOWN / NOTREACHABLE / WIFI / 3G / 2G / 4G / WWAN */ + networkType: NetworkType; + }) => void): void; + + /** + * 取消网络状态变化的监听 + */ + function offNetworkStatusChange(): void; + //#endregion + + //#region 剪贴板 https://docs.alipay.com/mini/api/clipboard + interface GetClipboardOptions extends BaseOptions { + success?(res: { + text: string; + }): void; + } + function getClipboard(options: GetClipboardOptions): void; + + interface SetClipboardOptions extends BaseOptions { + /** 剪贴板数据 */ + text: string; + } + function setClipboard(options: SetClipboardOptions): void; + //#endregion + + //#region 摇一摇 https://docs.alipay.com/mini/api/shake + function watchShake(options: BaseOptions): void; + //#endregion + + //#region 震动 https://docs.alipay.com/mini/api/vibrate + /** + * 调用震动功能。 + */ + function vibrate(options?: BaseOptions): void; + + /** + * 调用震动功能。 + */ + function vibrateLong(options?: BaseOptions): void; + + /** + * 调用震动功能。 + */ + function vibrateShort(options?: BaseOptions): void; + //#endregion + + //#region 拨打电话 https://docs.alipay.com/mini/api/macke-call + interface MakePhoneCallOptions extends BaseOptions { + /** + * 需要拨打的电话号码 + */ + number: string; + } + /** + * 拨打电话 + */ + function makePhoneCall(options: MakePhoneCallOptions): void; + //#endregion + + //#region 获取服务器时间 https://docs.alipay.com/mini/api/get-server-time + interface GetServerTimeOptions extends BaseOptions { + success?(res: { + /** 服务器时间的毫秒数 */ + time: number; + }): void; + } + function getServerTime(options: GetServerTimeOptions): void; + //#endregion + + //#region 用户截屏事件 https://docs.alipay.com/mini/api/user-capture-screen + /** + * 监听用户主动截屏事件,用户使用系统截屏按键截屏时触发此事件 + */ + function onUserCaptureScreen(callback?: (res: any) => void): void; + + /** + * 取消监听截屏事件。一般需要与 my.onUserCaptureScreen 成对出现。 + */ + function offUserCaptureScreen(): void; + //#endregion + + //#region 屏幕亮度 https://docs.alipay.com/mini/api/screen-brightness + interface SetKeepScreenOnOptions extends BaseOptions { + /** 是否保持屏幕常亮 */ + keepScreenOn: boolean; + success?(res: { errMsg: string }): void; + } + /** + * 设置是否保持常亮状态。 + * 仅在当前小程序生效,离开小程序后设置失效。 + */ + function setKeepScreenOn(options?: SetKeepScreenOnOptions): void; + + interface GetScreenBrightnessOptions extends BaseOptions { + /** 屏幕亮度值,范围 0~1,0 最暗,1 最亮 */ + success(value: number): void; + } + /** + * 获取屏幕亮度 + */ + function getScreenBrightness(options?: GetScreenBrightnessOptions): void; + + interface SetScreenBrightnessOptions extends BaseOptions { + /** 需要设置的屏幕亮度,取值范围0-1 */ + brightness: number; + } + /** + * 设置屏幕亮度 + */ + function setScreenBrightness(options: SetScreenBrightnessOptions): void; + //#endregion + + //#region 权限引导 https://docs.alipay.com/mini/api/show-auth-guide + interface showAuthGuideOptions extends BaseOptions { + /** + * 引导的权限标识,用于标识该权限类型(如 LBS) + * 支持的 authType 如下: + * + * 权限名称 权限码 支持平台 + * 后台保活权限 BACKGROUNDER Android + * 桌面快捷权限 SHORTCUT Android + * 麦克风权限 MICROPHONE iOS + * 通讯录权限 ADDRESSBOOK iOS + * 相机权限 CAMERA iOS + * 照片权限 PHOTO iOS + * push通知栏权限 NOTIFICATION iOS + * 自启动权限 SELFSTARTING Android + * lbs总开关 LBSSERVICE iOS + * lbs开关(app) LBS iOS + */ + authType: 'BACKGROUNDER' | 'SHORTCUT' | 'MICROPHONE' | 'ADDRESSBOOK' | 'CAMERA' | 'PHOTO' | 'NOTIFICATION' | 'SELFSTARTING' | 'LBSSERVICE' | 'LBS'; + } + function showAuthGuide(options: showAuthGuideOptions): void; + //#endregion +} + +// 扫码 +declare namespace my { + //#region 扫码 https://docs.alipay.com/mini/api/scan + type scanType = "qr" | "bar"; + interface ScanCodeData { + /** + * 扫描二维码时返回二维码数据 + */ + code: string; + /** + * 所扫码的类型 + */ + qrCode: string; + /** + * 扫描条形码时返回条形码数据 + */ + barCode: string; + } + interface ScanOptions extends BaseOptions { + /** + * 扫码样式(默认 qr): + * 1. qr,扫码框样式为二维码扫码框 + * 1. bar,扫码样式为条形码扫码框 + */ + type?: scanType; + /** + * 是否隐藏相册(不允许从相册选择图片),只能从相机扫码 + */ + hideAlbum?: boolean; + success?(res: ScanCodeData): void; + } + /** + * 调起客户端扫码界面,扫码成功后返回对应的结果 + */ + function scan(options: ScanOptions): void; + //#endregion +} + +// 蓝牙 +declare namespace my { + //#region 快速接入 https://docs.alipay.com/mini/api/bluetooth-intro + //#endregion + + //#region API https://docs.alipay.com/mini/api/bluetooth-api + interface OpenBluetoothAdapterOptions extends BaseOptions { + /** 不传的话默认是true,表示是否在离开当前页面时自动断开蓝牙(仅对android有效) */ + autoClose: boolean; + success(res: { + /** + * 是否支持 BLE + */ + isSupportBLE: boolean; + }): void; + } + /** + * 初始化小程序蓝牙模块,生效周期为调用 my.openBluetoothAdapter 至调用 my.closeBluetoothAdapter 或小程序被销毁为止。 在小程序蓝牙适配器模块生效期间,开发者可以正常调用下面的小程序API,并会收到蓝牙模块相关的 on 事件回调。 + */ + function openBluetoothAdapter(options: Partial): void; + + interface CloseBluetoothAdapterOptions extends BaseOptions { + success(res: any): void; + } + /** + * 关闭本机蓝牙模块 + */ + function closeBluetoothAdapter(options: CloseBluetoothAdapterOptions): void; + + interface BluetoothAdapterStateData extends ErrMsgResponse { + /** + * 是否正在搜索设备 + */ + discovering: boolean; + /** + * 蓝牙模块是否可用(需支持 BLE 并且蓝牙是打开状态) + */ + available: boolean; + } + interface GetBluetoothAdapterStateOptions extends BaseOptions { + success(res: BluetoothAdapterStateData): void; + } + /** + * 获取本机蓝牙适配器状态 + */ + function getBluetoothAdapterState(options: GetBluetoothAdapterStateOptions): void; + + interface StartBluetoothDevicesDiscoveryOptions extends BaseOptions { + /** + * 蓝牙设备主 service 的 uuid 列表 + * 某些蓝牙设备会广播自己的主 service 的 uuid。如果这里传入该数组,那么根据该 uuid 列表,只搜索有这个主服务的设备。 + */ + services?: string[]; + /** + * 否允许重复上报同一设备, 如果允许重复上报,则onDeviceFound 方法会多次上报同一设备,但是 RSSI 值会有不同 + */ + allowDuplicatesKey?: boolean; + /** + * 上报设备的间隔,默认为0,意思是找到新设备立即上报,否则根据传入的间隔上报 + */ + interval?: number; + } + /** + * 开始搜寻附近的蓝牙外围设备。搜索结果将在 my.onBluetoothDeviceFound 事件中返回。 + */ + function startBluetoothDevicesDiscovery(options: StartBluetoothDevicesDiscoveryOptions): void; + + interface StopBluetoothDevicesDiscoveryOptions extends BaseOptions { + success(res: ErrMsgResponse): void; + } + /** + * 停止搜寻附近的蓝牙外围设备。请在确保找到需要连接的设备后调用该方法停止搜索。 + */ + function stopBluetoothDevicesDiscovery(options: StopBluetoothDevicesDiscoveryOptions): void; + + /** + * 蓝牙设备信息 + */ + interface BluetoothDevice { + /** + * 蓝牙设备名称,某些设备可能没有 + */ + name: string; + /** + * (兼容旧版本) 值与 name 一致 + */ + deviceName: string; + /** + * 广播设备名称 + */ + localName: string; + /** + * 设备的 id + */ + deviceId: string; + /** + * 设备信号强度 + */ + RSSI: number; + /** + * 设备的广播内容 + */ + advertisData: ArrayBuffer; + /** + * 设备的manufacturerData + */ + manufacturerData: ArrayBuffer; + } + interface GetBluetoothDevicesOptions extends BaseOptions { + success( + res: { + devices: BluetoothDevice[]; + } & ErrMsgResponse + ): void; + } + /** + * 获取所有已发现的蓝牙设备,包括已经和本机处于连接状态的设备。 + */ + function getBluetoothDevices(options: GetBluetoothDevicesOptions): void; + + interface GetConnectedBluetoothDevicesOptions extends BaseOptions { + services?: string[]; + success( + res: { + devices: BluetoothDevice[]; + } & ErrMsgResponse + ): void; + } + /** + * 获取处于已连接状态的设备。 + */ + function getConnectedBluetoothDevices(options: GetConnectedBluetoothDevicesOptions): void; + + interface BLEDeviceOptions extends BaseOptions { + /** + * 蓝牙设备id + */ + deviceId: string; + } + /** + * 连接低功耗蓝牙设备。 + */ + function connectBLEDevice(options: BLEDeviceOptions): void; + + /** + * 断开与低功耗蓝牙设备的连接。 + */ + function disconnectBLEDevice(options: BLEDeviceOptions): void; + + interface WriteBLECharacteristicValueOptions extends BaseOptions { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 蓝牙特征值对应服务的 uuid + */ + serviceId: string; + /** + * 蓝牙特征值的 uuid + */ + characteristicId: string; + /** + * 蓝牙设备特征值对应的值,16进制字符串,限制在20字节内 + */ + value: string; + } + /** + * 向低功耗蓝牙设备特征值中写入数据。 + */ + function writeBLECharacteristicValue( + options: WriteBLECharacteristicValueOptions + ): void; + + interface ReadBLECharacteristicValueOptions extends BaseOptions { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 蓝牙特征值对应服务的 uuid + */ + serviceId: string; + /** + * 蓝牙特征值的 uuid + */ + characteristicId: string; + success( + res: { + characteristic: { + /** + * 蓝牙设备特征值的 uuid + */ + characteristicId: string; + /** + * 蓝牙设备特征值对应服务的 uuid + */ + serviceId: string; + /** + * 蓝牙设备特征值对应的二进制值 + */ + value: ArrayBuffer; + }; + } & ErrMsgResponse + ): void; + } + + /** + * 读取低功耗蓝牙设备特征值中的数据。调用后在 my.onBLECharacteristicValueChange() 事件中接收数据返回。 + */ + function readBLECharacteristicValue(options: ReadBLECharacteristicValueOptions): void; + + interface NotifyBLECharacteristicValueChangeOptions extends BaseOptions { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 蓝牙特征值对应 service 的 uuid + */ + serviceId: string; + /** + * 蓝牙特征值的 uuid + */ + characteristicId: string; + /** + * notify 的 descriptor 的 uuid (只有android 会用到,非必填,默认值00002902-0000-10008000-00805f9b34fb) + */ + descriptorId?: string; + /** + * 是否启用notify或indicate + */ + state?: boolean; + } + function notifyBLECharacteristicValueChange(optons: NotifyBLECharacteristicValueChangeOptions): void; + + interface NotifyBLECharacteristicValueChangedOptions extends BaseOptions { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 蓝牙特征值对应服务的 uuid + */ + serviceId: string; + /** + * 蓝牙特征值的 uuid + */ + characteristicId: string; + /** + * notify 的 descriptor 的 uuid (只有android 会用到,非必填,默认值00002902-0000-10008000-00805f9b34fb) + */ + descriptorId?: string; + /** + * true: 启用 notify; false: 停用 notify + */ + state: boolean; + success(res: ErrMsgResponse): void; + } + /** + * 启用低功耗蓝牙设备特征值变化时的 notify 功能。注意:设备的特征值必须支持 notify/indicate 才可以成功调用,具体参照 characteristic 的 properties 属性 另外,必须先启用 notify 才能监听到设备 characteristicValueChange 事件。 + */ + function notifyBLECharacteristicValueChanged(options: NotifyBLECharacteristicValueChangedOptions): void; + + interface GetBLEDeviceServicesOptions extends BaseOptions { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 成功则返回本机蓝牙适配器状态 + */ + success(res: { + services: Array<{ + /** + * 蓝牙设备服务的 uuid + */ + serviceId: string; + /** + * 该服务是否为主服务 + */ + isPrimary: boolean; + }>; + } & ErrMsgResponse): void; + } + /** + * 获取蓝牙设备所有 service(服务) + */ + function getBLEDeviceServices(options: GetBLEDeviceServicesOptions): void; + + interface GetBLEDeviceCharacteristicsOptions extends BaseOptions { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 蓝牙服务 uuid + */ + serviceId: string; + /** + * 成功则返回本机蓝牙适配器状态 + */ + success(res: { + characteristics: Array<{ + /** + * 蓝牙设备特征值的 uuid + */ + characteristicId: string; + /** + * 蓝牙设备特征值对应服务的 uuid + */ + serviceId: string; + /** + * 蓝牙设备特征值对应的16进制值 + */ + value: ArrayBuffer; + /** + * 该特征值支持的操作类型 + */ + properties: Array<{ + /** + * 该特征值是否支持 read 操作 + */ + read: boolean; + /** + * 该特征值是否支持 write 操作 + */ + write: boolean; + /** + * 该特征值是否支持 notify 操作 + */ + notify: boolean; + /** + * 该特征值是否支持 indicate 操作 + */ + indicate: boolean; + }>; + }>; + } & ErrMsgResponse): void; + } + /** + * 获取蓝牙设备所有 characteristic(特征值) + */ + function getBLEDeviceCharacteristics(options: GetBLEDeviceCharacteristicsOptions): void; + + interface OnBluetoothDeviceFoundOptions extends BaseOptions { + success?(res: { + devices: BluetoothDevice[]; + }): void; + } + /** + * 搜索到新的蓝牙设备时触发此事件。 + */ + function onBluetoothDeviceFound(options: OnBluetoothDeviceFoundOptions): void; + + /** + * 移除寻找到新的蓝牙设备事件的监听。 + */ + function offBluetoothDeviceFound(callback?: any): void; + + interface OnBLECharacteristicValueChangeOptions extends BaseOptions { + success?(res: { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 蓝牙特征值对应 service 的 uuid + */ + serviceId: string; + /** + * 蓝牙特征值的 uuid + */ + characteristicId: string; + /** + * 特征值最新的16进制值 + */ + value: ArrayBuffer; + }): void; + } + /** + * 监听低功耗蓝牙设备的特征值变化的事件。 + */ + function onBLECharacteristicValueChange(options: OnBLECharacteristicValueChangeOptions): void; + + interface OnBLEConnectionStateChangedOptions extends BaseOptions { + success?(res: { + /** + * 蓝牙设备 id,参考 device 对象 + */ + deviceId: string; + /** + * 连接目前的状态 + */ + connected: boolean; + }): void; + } + /** + * 移除低功耗蓝牙设备的特征值变化事件的监听。 + */ + function offBLECharacteristicValueChange(callback?: any): void; + + /** + * 监听低功耗蓝牙连接的错误事件,包括设备丢失,连接异常断开等。 + */ + function onBLEConnectionStateChanged(options: OnBLEConnectionStateChangedOptions): void; + + /** + * 移除低功耗蓝牙连接状态变化事件的监听。 + */ + function offBLEConnectionStateChanged(): void; + + interface BluetoothAdapterState { + /** + * 蓝牙适配器是否可用 + */ + available: boolean; + /** + * 蓝牙适配器是否处于搜索状态 + */ + discovering: boolean; + } + /** + * 监听本机蓝牙状态变化的事件。 + */ + function onBluetoothAdapterStateChange(callback: (res: BluetoothAdapterState) => void): void; + + /** + * 移除本机蓝牙状态变化的事件的监听。 + */ + function offBluetoothAdapterStateChange(): void; + //#endregion +} + +// iBeacon +declare namespace my { + //#region iBeacon https://docs.alipay.com/mini/api/yqleyc + interface StartBeaconDiscoveryOptions extends BaseOptions { + /** + * iBeacon设备广播的 uuids + */ + uuids: string[]; + success?(res: ErrMsgResponse): void; + } + /** + * 开始搜索附近的iBeacon设备 + */ + function startBeaconDiscovery(options: StartBeaconDiscoveryOptions): void; + + interface StopBeaconDiscoveryOptions extends BaseOptions { + success?(res: ErrMsgResponse): void; + } + /** + * 停止搜索附近的iBeacon设备 + */ + function stopBeaconDiscovery(options: StopBeaconDiscoveryOptions): void; + + interface Beacon { + /** iBeacon 设备广播的 uuid */ + uuid: string; + /** iBeacon 设备的主 id */ + major: string; + /** iBeacon 设备的次 id */ + minor: string; + /** 表示设备距离的枚举值(0-3分别代表:未知、极近、近、远) */ + proximity: 0 | 1 | 2 | 3; + /** iBeacon 设备的距离 */ + accuracy: number; + /** iBeacon 信号强度 */ + rssi: number; + } + interface GetBeaconsSuccess { + beacons: Beacon[]; + /** + * errorCode=0 ,接口调用成功 + */ + errCode: string; + /** + * ok + */ + errMsg: string; + } + interface GetBeaconsOptions extends BaseOptions { + success?(options: GetBeaconsSuccess): void; + } + /** + * 获取所有已搜索到的iBeacon设备 + */ + function getBeacons(options: GetBeaconsOptions): void; + + interface BeaconUpdateOptions extends BaseOptions { + success?(res: { + beacons: Beacon[]; + }): void; + } + /** + * 监听 iBeacon 设备的更新事件 + */ + function onBeaconUpdate(options: BeaconUpdateOptions): void; + + interface BeaconServiceChangeOptions extends BaseOptions { + success?(res: { + /** + * 服务目前是否可用 + */ + available: boolean; + /** + * 目前是否处于搜索状态 + */ + discovering: boolean; + }): void; + } + /** + * 监听 iBeacon 服务的状态变化 + */ + function onBeaconServiceChange(options: BeaconServiceChangeOptions): void; + //#endregion +} + +// 数据安全 +declare namespace my { + //#region 数据安全 https://docs.alipay.com/mini/api/data-safe + interface RsaOptions extends BaseOptions { + /** + * 使用rsa加密还是rsa解密,encrypt加密,decrypt解密 + */ + action: string; + /** + * 要处理的文本,加密为原始文本,解密为Base64编码格式文本 + */ + text: string; + /** + * rsa秘钥,加密使用公钥,解密使用私钥 + */ + key: string; + success?(res: { + /** + * 经过处理过后得到的文本,加密为Base64编码文本,解密为原始文本 + */ + text: string; + }): void; + } + /** + * 非对称加密。 + */ + function rsa(options: RsaOptions): void; + //#endregion +} + +// 分享 +declare namespace my { + //#region 分享 https://docs.alipay.com/mini/api/share_app + //#endregion +} + +// 自定义分析 +declare namespace my { + //#region 自定义分析 https://docs.alipay.com/mini/api/report + /** + * 自定义分析数据的上报接口。使用前需要在小程序管理后台的事件管理中新建事件,并配置好事件名和字段。 + * + * @param eventName 自定义事件名,需申请 + * @param data 上报的数据 + */ + function reportAnalytics(eventName: string, data: any): void; + + /** + * 隐藏分享按钮。 + */ + function hideShareMenu(options?: BaseOptions): void; + //#endregion +} + +declare namespace my { + interface LaunchOptions { + /** + * 打开小程序的路径 + */ + path: string; + /** + * 打开小程序的query + */ + query: object; + /** + * 打开小程序的[场景值] + */ + scene: number; + /** + * shareTicket,详见 获取更多[转发信息] + */ + shareTicket: string; + /** + * 当场景为由从另一个小程序或公众号或App打开时,返回此字段 + */ + referrerInfo: object; + /** + * 来源小程序或公众号或App的 appId,详见下方说明 + */ + "referrerInfo.appId": string; + /** + * 来源小程序传过来的数据,scene=1037或1038时支持 + */ + "referrerInfo.extraData": object; + // #endregion + } + interface AppOptions { + /** + * 监听小程序初始化。 + * 当小程序初始化完成时,会触发 onLaunch(全局只触发一次) + * 生命周期函数 + */ + onLaunch?: (option: LaunchOptions) => void; + /** + * 监听小程序显示。 + * 当小程序启动,或从后台进入前台显示,会触发 onShow + * 生命周期函数 + */ + onShow?: (option: LaunchOptions) => void; + /** + * 监听小程序隐藏。 + * 当小程序从前台进入后台,会触发 onHide + * 生命周期函数 + */ + onHide?: () => void; + /** + * 错误监听函数 + * 当小程序发生脚本错误或者 api 调用失败时 + * 会触发 onError 并带上错误信息 + */ + onError?: (msg: string) => void; + /** + * 小程序退出时触发 + */ + onUnlaunch?: () => void; + /** + * 全局Data + */ + globalData?: object; + [key: string]: any; + } + interface CreateIntersectionObserverOption { + thresholds?: [number, number]; + initialRatio?: number; + selectAll?: boolean; + } + + interface Margins { + left?: number; + right?: number; + top?: number; + bottom?: number; + } + interface ObserveResponse { + id: string; + dataset: any; + time: number; + intersectionRatio: number; // 相交区域占目标节点的布局区域的比例 + boundingClientRect: RectArea; + intersectionRect: RectArea; + relativeRect: RectArea; + } + interface IntersectionObserver { + relativeTo(selector?: string, margins?: Margins): IntersectionObserver; + relativeToViewport(margins?: Margins): IntersectionObserver; + observe( + selector?: string, + callback?: (response: ObserveResponse) => void + ): IntersectionObserver; + disconnect(): void; + } + interface ComponentRelation { + /** 目标组件的相对关系,可选的值为 parent 、 child 、 ancestor 、 descendant */ + type: "parent" | "child" | "ancestor" | "descendant"; + /** 如果这一项被设置,则它表示关联的目标节点所应具有的behavior,所有拥有这一behavior的组件节点都会被关联 */ + target?: string; + /** 关系生命周期函数,当关系被建立在页面节点树中时触发,触发时机在组件attached生命周期之后 */ + linked?: (target: Component) => void; + /** 关系生命周期函数,当关系在页面节点树中发生改变时触发,触发时机在组件moved生命周期之后 */ + linkChanged?: (target: Component) => void; + /** 关系生命周期函数,当关系脱离页面节点树时触发,触发时机在组件detached生命周期之后 */ + unlinked?: (target: Component) => void; + } + interface Component { + /** + * 组件的文件路径 + */ + is: string; + /** + * 节点id + */ + id: string; + /** + * 节点dataset + */ + dataset: string; + /** + * 组件数据,包括内部数据和属性值 + */ + data: any; + + /** + * 组件数据,包括内部数据和属性值(与 data 一致) + */ + properties: any; + /** + * 将数据从逻辑层发送到视图层,同时改变对应的 this.data 的值 + * 1. 直接修改 this.data 而不调用 this.setData 是无法改变页面的状态的,还会造成数据不一致。 + * 2. 单次设置的数据不能超过1024kB,请尽量避免一次设置过多的数据。 + * 3. 请不要把 data 中任何一项的 value 设为 undefined ,否则这一项将不被设置并可能遗留一些潜在问题 + * @param data object 以 key,value 的形式表示将 this.data 中的 key 对应的值改变成 value + * @param [callback] callback 是一个回调函数,在这次setData对界面渲染完毕后调用 + */ + setData( + data: any, + callback?: () => void + ): void; + hasBehavior(behavior: any): boolean; + triggerEvent( + name: string, + details?: any, + options?: Partial<{ + bubbles: boolean; + composed: boolean; + capturePhase: boolean; + }> + ): void; + createSelectorQuery(): SelectorQuery; + createIntersectionObserver( + options?: CreateIntersectionObserverOption + ): IntersectionObserver; + /** + * 使用选择器选择组件实例节点 + * 返回匹配到的第一个组件实例对象 + */ + selectComponent(selector: string): Component; + /** + * selector 使用选择器选择组件实例节点,返回匹配到的全部组件实例对象组成的数组 + */ + selectAllComponents(selector: string): Component[]; + getRelationNodes(relationKey: string): ComponentRelation[]; + } + interface Page extends Component { + /** + * data + */ + data: any; + /** + * 强制更新 + */ + forceUpdate(): void; + /** + * 字段可以获取到当前页面的路径。 + */ + route(): void; + /** + * 更新 + */ + update(): void; + /** + * 将页面滚动到目标位置。 + * + * scrollTop 滚动到页面的目标位置(单位px) + * [duration] 滚动动画的时长,默认300ms,单位 ms + */ + pageScrollTo(option?: PageScrollToOptions): void; + [key: string]: any; + } + interface App { + /** + * 获取当前页面 + */ + getCurrentPage(): Page; + } + interface EventTarget { + id: string; + tagName: string; + dataset: { [name: string]: string }; + } + type TouchEventType = + | "tap" + | "touchstart" + | "touchmove" + | "touchcancel" + | "touchend" + | "touchforcechange"; + + type TransitionEventType = + | "transitionend" + | "animationstart" + | "animationiteration" + | "animationend"; + + type EventType = + | "input" + | "form" + | "submit" + | "scroll" + | TouchEventType + | TransitionEventType + | "tap" + | "longpress"; + interface BaseEvent { + type: T; + timeStamp: number; + currentTarget: EventTarget; + target: EventTarget; + detail: Detail; + } + interface Options { + query: any; // 当前小程序的 query + path: string; // 当前小程序的页面地址 + } + interface PageOptions { + data: any; + onLaunch(this: Page, options: Options): void; + onShow(this: Page, options: Options): void; + onHide(this: Page): void; + onError(this: Page): void; + [key: string]: any; + } + function postMessage(param: any): void; + type onMessageFun = (p: any) => void; + let onMessage: onMessageFun; +} + +declare function App(app: Partial): void; + +declare function getApp(): my.App; + +declare function Behavior(options?: any): my.Component; + +declare function Component(options?: any): my.Component; + +declare function Page(options: Partial): void; + +declare function getCurrentPages(): my.Page[]; diff --git a/types/ali-app/tsconfig.json b/types/ali-app/tsconfig.json new file mode 100644 index 0000000000..a2402fac2c --- /dev/null +++ b/types/ali-app/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "esnext", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "ali-app-tests.ts" + ], + "exclude": [ + ".prettierrc" + ] +} \ No newline at end of file diff --git a/types/ali-app/tslint.json b/types/ali-app/tslint.json new file mode 100644 index 0000000000..22f8814fa9 --- /dev/null +++ b/types/ali-app/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-mergeable-namespace": false, + "no-any-union": false, + "no-unnecessary-generics": false + } +} \ No newline at end of file From 044f0c151e319316589d462969f5963df806b7b2 Mon Sep 17 00:00:00 2001 From: taoqf Date: Wed, 31 Oct 2018 12:32:39 +0800 Subject: [PATCH 0142/1121] add this --- types/ali-app/index.d.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/types/ali-app/index.d.ts b/types/ali-app/index.d.ts index 371c4734d0..47e0b18862 100644 --- a/types/ali-app/index.d.ts +++ b/types/ali-app/index.d.ts @@ -3034,29 +3034,29 @@ declare namespace my { * 当小程序初始化完成时,会触发 onLaunch(全局只触发一次) * 生命周期函数 */ - onLaunch?: (option: LaunchOptions) => void; + onLaunch?: (this: App, option: LaunchOptions) => void; /** * 监听小程序显示。 * 当小程序启动,或从后台进入前台显示,会触发 onShow * 生命周期函数 */ - onShow?: (option: LaunchOptions) => void; + onShow?: (this: App, option: LaunchOptions) => void; /** * 监听小程序隐藏。 * 当小程序从前台进入后台,会触发 onHide * 生命周期函数 */ - onHide?: () => void; + onHide?: (this: App) => void; /** * 错误监听函数 * 当小程序发生脚本错误或者 api 调用失败时 * 会触发 onError 并带上错误信息 */ - onError?: (msg: string) => void; + onError?: (this: App, msg: string) => void; /** * 小程序退出时触发 */ - onUnlaunch?: () => void; + onUnlaunch?: (this: App) => void; /** * 全局Data */ @@ -3191,10 +3191,12 @@ declare namespace my { [key: string]: any; } interface App { + data: any; /** * 获取当前页面 */ getCurrentPage(): Page; + [key: string]: any; } interface EventTarget { id: string; From baaa7e16fe73fe42800abc7d4d327138a10d00c3 Mon Sep 17 00:00:00 2001 From: taoqf Date: Wed, 31 Oct 2018 14:32:16 +0800 Subject: [PATCH 0143/1121] make props optional --- types/ali-app/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/ali-app/index.d.ts b/types/ali-app/index.d.ts index 47e0b18862..78e9d4b882 100644 --- a/types/ali-app/index.d.ts +++ b/types/ali-app/index.d.ts @@ -152,9 +152,9 @@ declare namespace my { /** prompt框标题 */ title?: string; /** prompt框文本,默认‘请输入内容’ */ - message: string; + message?: string; /** 输入框内的提示文案 */ - placeholder: string; + placeholder?: string; /** message对齐方式,可用枚举left/center/right,iOS ‘center’, android ‘left’ */ align?: 'left' | 'center' | 'right' | string; /** 确认按钮文字,默认‘确定’ */ From 5d9d363cc17e6d032525223d9d590c6b1b7ce98b Mon Sep 17 00:00:00 2001 From: taoqf Date: Wed, 31 Oct 2018 17:10:36 +0800 Subject: [PATCH 0144/1121] improve some options --- types/ali-app/index.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/types/ali-app/index.d.ts b/types/ali-app/index.d.ts index 78e9d4b882..3bdd10f6ef 100644 --- a/types/ali-app/index.d.ts +++ b/types/ali-app/index.d.ts @@ -171,7 +171,7 @@ declare namespace my { */ content: string; /** toast 类型,展示相应图标,默认 none,支持 success / fail / exception / none’。其中 exception 类型必须传文字信息 */ - type: 'none' | 'success' | 'fail' | 'exception' | string; + type?: 'none' | 'success' | 'fail' | 'exception' | string; /** * 显示时长,单位为 ms,默认 2000 */ @@ -187,9 +187,11 @@ declare namespace my { /** * loading的文字内容 */ - content: string; - /** 延迟显示,单位 ms,默认 0。如果在此时间之前调用了 my.hideLoading 则不会显示 */ - delay: number; + content?: string; + /** + * 延迟显示,单位 ms,默认 0。如果在此时间之前调用了 my.hideLoading 则不会显示 + */ + delay?: number; } /** * 显示加载提示 @@ -225,11 +227,11 @@ declare namespace my { } interface ActionSheetOptions extends BaseOptions { /** 菜单标题 */ - title: string; + title?: string; /** * 菜单按钮文字数组 */ - items?: string[]; + items: string[]; /** * 取消按钮文案。默认为‘取消’。注:Android平台此字段无效,不会显示取消按钮。 */ From 6c4c5409bf86ed2e719b64ac44f584766d6a42e9 Mon Sep 17 00:00:00 2001 From: Hugues Stefanski Date: Wed, 31 Oct 2018 12:23:30 +0100 Subject: [PATCH 0145/1121] #30160 : density.weight in d3-contour --- types/d3-contour/d3-contour-tests.ts | 7 +++++++ types/d3-contour/index.d.ts | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/types/d3-contour/d3-contour-tests.ts b/types/d3-contour/d3-contour-tests.ts index 0184979be0..2d23017040 100644 --- a/types/d3-contour/d3-contour-tests.ts +++ b/types/d3-contour/d3-contour-tests.ts @@ -144,6 +144,13 @@ contDensCustom = contDensCustom.y((datum) => { // get const yAcc: (d: CustomDatum) => number = contDensCustom.y(); +// weight(...) ----------------------------------------------------------------- +contDensCustom = contDensCustom.weight((datum) => { + return 5; +}); + +// get +const weightAcc: (d: CustomDatum) => number = contDensCustom.weight(); // size(...) ------------------------------------------------------------------- // set with chainability diff --git a/types/d3-contour/index.d.ts b/types/d3-contour/index.d.ts index 8d42275ee2..4477c4bfa5 100644 --- a/types/d3-contour/index.d.ts +++ b/types/d3-contour/index.d.ts @@ -126,7 +126,7 @@ export function contours(): Contours; * the elements of the data array used with the density contour generator are two-element arrays. * The first element corresponds to the x-dimension, the second to the y-dimension. */ -export interface ContourDensity { +export interface ContourDensity { /** * Estimates the density contours for the given array of data, returning an array of GeoJSON MultiPolygon geometry objects. * Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to @@ -169,6 +169,18 @@ export interface ContourDensity { */ y(y: (d: Datum) => number): this; + /** + * Returns the current point weight accessor. + */ + weight(): (d: Datum) => number; + + /** + * Sets the point weight accessor and returns the density contour estimator. + * + * @param weight A point weight accessor function. + */ + weight(weight: (d: Datum) => number): this; + /** * Returns the current size, which defaults to [960, 500]. */ @@ -254,4 +266,4 @@ export interface ContourDensity { * Important: ensure that the x- and y-accessor functions are configured to * match the data type used for the generic Datum. */ -export function contourDensity(): ContourDensity; +export function contourDensity(): ContourDensity; From 0f855d0d5d3fdb64cf9bd6643b286d656f687e94 Mon Sep 17 00:00:00 2001 From: Hugues Stefanski Date: Wed, 31 Oct 2018 12:24:25 +0100 Subject: [PATCH 0146/1121] #30160 : updated d3-contour version --- types/d3-contour/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/d3-contour/index.d.ts b/types/d3-contour/index.d.ts index 4477c4bfa5..54a9964c2d 100644 --- a/types/d3-contour/index.d.ts +++ b/types/d3-contour/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for d3-contour 1.2 +// Type definitions for d3-contour 1.3 // Project: https://d3js.org/d3-contour/ // Definitions by: Tom Wanzek , Hugues Stefanski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.2.0 +// Last module patch version validated against: 1.3.2 import { MultiPolygon } from 'geojson'; import { ThresholdNumberArrayGenerator, ThresholdCountGenerator } from 'd3-array'; From 0a3806c9d86dffcd9ec9e64b5bcda2d488000b02 Mon Sep 17 00:00:00 2001 From: Hugues Stefanski Date: Wed, 31 Oct 2018 12:31:09 +0100 Subject: [PATCH 0147/1121] #30160 : fix missing whitespaces --- types/d3-contour/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/d3-contour/index.d.ts b/types/d3-contour/index.d.ts index 54a9964c2d..bb77fb4ef8 100644 --- a/types/d3-contour/index.d.ts +++ b/types/d3-contour/index.d.ts @@ -126,7 +126,7 @@ export function contours(): Contours; * the elements of the data array used with the density contour generator are two-element arrays. * The first element corresponds to the x-dimension, the second to the y-dimension. */ -export interface ContourDensity { +export interface ContourDensity { /** * Estimates the density contours for the given array of data, returning an array of GeoJSON MultiPolygon geometry objects. * Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to @@ -266,4 +266,4 @@ export interface ContourDensity { * Important: ensure that the x- and y-accessor functions are configured to * match the data type used for the generic Datum. */ -export function contourDensity(): ContourDensity; +export function contourDensity(): ContourDensity; From f037f5bd7478859b215e6df77c100f92682482f1 Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 12:11:34 +0000 Subject: [PATCH 0148/1121] Add tests for commands --- types/slate/index.d.ts | 19 ++- types/slate/slate-tests.ts | 246 +++++++++++++++++++++++++++++++++++-- 2 files changed, 244 insertions(+), 21 deletions(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index aae337ed04..7d5eb5ce34 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -1546,15 +1546,15 @@ export class Editor { /** * Move the start of the current selection backward n characters */ - moveStartForward(point: Point, n?: number): Editor; + moveStartForward(n?: number): Editor; /** * Move the start of the current selection forward n characters */ - moveStartBackward(point: Point, n?: number): Editor; + moveStartBackward(n?: number): Editor; /** * Move the start of the current selection to a new path and offset */ - moveStartTo(point: Point, n?: number): Editor; + moveStartTo(path: Path, n?: number): Editor; /** * Move the start of the current selection to the end of the closest block parent. */ @@ -1894,7 +1894,7 @@ export class Editor { key: string, offset: number, length: number, - mark: Mark + mark: MarkProperties | Mark | string ): Editor; /** * Add a mark to length characters starting at an offset in a node by path @@ -1962,7 +1962,7 @@ export class Editor { key: string, offset: number, length: number, - mark: Mark + mark: Mark | Mark | string ): Editor; /** * Remove a mark from length characters starting at an offset in a node by path @@ -2020,14 +2020,11 @@ export class Editor { /** * Set a dictionary of properties on a node by its key. */ - setNodeByKey( - key: string, - properties: BlockProperties | InlineProperties | string - ): Editor; + setNodeByKey(key: string, properties: BlockProperties | InlineProperties | string): Editor; /** * Set a dictionary of properties on a node by its key. */ - setNodeByPath(path: Path, properties: NodeProperties): Editor; + setNodeByPath(path: Path, properties: NodeProperties | InlineProperties | string): Editor; /** * Split a node by its key at an offset */ @@ -2051,7 +2048,7 @@ export class Editor { /** * Unwrap all inner content of a block node by its path that match properties */ - unwrapBlockByPath(path: Path, properties: BlockProperties): Editor; + unwrapBlockByPath(path: Path, properties: BlockProperties | string): Editor; /** * Unwrap a single node from its parent. if the node is surrounded with siblings the parent will be split. * If the node is an only child, it will replace the parent diff --git a/types/slate/slate-tests.ts b/types/slate/slate-tests.ts index 4439140bdc..0d6f2331e5 100644 --- a/types/slate/slate-tests.ts +++ b/types/slate/slate-tests.ts @@ -1,4 +1,4 @@ -import { Value, Data, BlockJSON, Document, Editor, KeyUtils } from "slate"; +import { Value, Data, BlockJSON, Document, Editor, KeyUtils, Range, Point, Inline, Mark } from "slate"; const data = Data.create({ foo: "bar " }); const value = Value.create({ data }); @@ -9,6 +9,7 @@ const node: BlockJSON = { nodes: [ { object: "text", + key: "a", leaves: [ { text: "example", @@ -26,6 +27,10 @@ const doc = Document.fromJSON({ }); const editor = new Editor({ value }); +const point = Point.create({ key: "a", offset: 0 }); +const range = Range.create({ anchor: point, focus: point }); +const inline = Inline.create("text"); +const mark = Mark.create("bold"); editor.registerQuery("testQuery"); editor.registerCommand("testCommand"); @@ -34,25 +39,246 @@ editor.command("testCommand"); editor.query("testQuery"); editor.run("testCommand"); editor.event("mouseDown", new Event("mouseDown")); + +// Test all editor commands editor -.focus() -.moveAnchorToStartOfDocument() -.moveFocusToEndOfDocument() -.delete() -.insertText("A bit of rich text, followed by...") -.moveToStartOfText() -.moveFocusForward(4) .addMark("bold") -.moveToEndOfNextBlock() +.addMarkAtRange(range, "italic") +.addMarkByKey("a", 0, 1, "bold") +.addMarkByPath("a", 0, 1, "bold") +.blur() +.delete() +.deleteAtRange(range) +.deleteBackward(0) +.deleteBackwardAtRange(range, 0) +.deleteCharBackwardAtRange(range) +.deleteCharForwardAtRange(range) +.deleteForward(0) +.deleteForwardAtRange(range, 0) +.deleteLineBackwardAtRange(range) +.deleteLineForwardAtRange(range) +.deleteWordBackwardAtRange(range) +.deleteWordForwardAtRange(range) +.deselect() +.flip() +.flush() +.focus() .insertBlock({ type: "image", + key: "b", data: { src: "http://placekitten.com/200/300", alt: "Kittens", className: "img-responsive" } }) -.insertBlock("paragraph"); +.insertBlockAtRange(range, "text") +.insertFragment(doc) +.insertFragmentAtRange(range, doc) +.insertFragmentByKey("a", 0, doc) +.insertFragmentByPath("a", 0, doc) +.insertInline(inline) +.insertInlineAtRange(range, inline) +.insertNodeByKey("a", 0, inline) +.insertNodeByPath("a", 0, inline) +.insertText("A bit of rich text, followed by...") +.insertTextAtRange(range, "More text") +.insertTextByKey("a", 0, "text") +.insertTextByPath("a", 0, "text") +.mergeNodeByKey("b") +.mergeNodeByPath("b") +.moveAnchorBackward() +.moveAnchorEndOfNode(inline) +.moveAnchorForward() +.moveAnchorTo("a", 0) +.moveAnchorToEndOfBlock() +.moveAnchorToEndOfDocument() +.moveAnchorToEndOfInline() +.moveAnchorToEndOfNextBlock() +.moveAnchorToEndOfNextInline() +.moveAnchorToEndOfNextText() +.moveAnchorToEndOfPreviousBlock() +.moveAnchorToEndOfPreviousInline() +.moveAnchorToEndOfPreviousText() +.moveAnchorToEndOfText() +.moveAnchorToStartOfBlock() +.moveAnchorToStartOfDocument() +.moveAnchorToStartOfInline() +.moveAnchorToStartOfNextBlock() +.moveAnchorToStartOfNextInline() +.moveAnchorToStartOfNextText() +.moveAnchorToStartOfNode(inline) +.moveAnchorToStartOfPreviousBlock() +.moveAnchorToStartOfPreviousInline() +.moveAnchorToStartOfPreviousText() +.moveAnchorToStartOfText() +.moveBackward() +.moveEndBackward() +.moveEndForward() +.moveEndTo("a", 0) +.moveEndToEndOfBlock() +.moveEndToEndOfDocument() +.moveEndToEndOfInline() +.moveEndToEndOfNextBlock() +.moveEndToEndOfNextInline() +.moveEndToEndOfNextText() +.moveEndToEndOfNode(inline) +.moveEndToEndOfPreviousBlock() +.moveEndToEndOfPreviousInline() +.moveEndToEndOfPreviousText() +.moveEndToEndOfText() +.moveEndToStartOfBlock() +.moveEndToStartOfDocument() +.moveEndToStartOfInline() +.moveEndToStartOfNextBlock() +.moveEndToStartOfNextInline() +.moveEndToStartOfNextText() +.moveEndToStartOfNode(inline) +.moveEndToStartOfPreviousBlock() +.moveEndToStartOfPreviousInline() +.moveEndToStartOfPreviousText() +.moveEndToStartOfText() +.moveFocusBackward() +.moveFocusForward() +.moveFocusTo("a", 0) +.moveFocusToEndOfBlock() +.moveFocusToEndOfDocument() +.moveFocusToEndOfInline() +.moveFocusToEndOfNextBlock() +.moveFocusToEndOfNextInline() +.moveFocusToEndOfNextText() +.moveFocusToEndOfNode(inline) +.moveFocusToEndOfPreviousBlock() +.moveFocusToEndOfPreviousInline() +.moveFocusToEndOfPreviousText() +.moveFocusToEndOfText() +.moveFocusToStartOfBlock() +.moveFocusToStartOfDocument() +.moveFocusToStartOfInline() +.moveFocusToStartOfNextBlock() +.moveFocusToStartOfNextInline() +.moveFocusToStartOfNextText() +.moveFocusToStartOfNode(inline) +.moveFocusToStartOfPreviousBlock() +.moveFocusToStartOfPreviousInline() +.moveFocusToStartOfPreviousText() +.moveFocusToStartOfText() +.moveForward() +.moveNodeByKey("b", "c", 2) +.moveNodeByPath("c", "b", 1) +.moveStartBackward() +.moveStartForward() +.moveStartTo("a", 0) +.moveStartToEndOfBlock() +.moveStartToEndOfDocument() +.moveStartToEndOfInline() +.moveStartToEndOfNextBlock() +.moveStartToEndOfNextInline() +.moveStartToEndOfNextText() +.moveStartToEndOfNode(inline) +.moveStartToEndOfPreviousBlock() +.moveStartToEndOfPreviousInline() +.moveStartToEndOfPreviousText() +.moveStartToEndOfText() +.moveStartToStartOfBlock() +.moveStartToStartOfDocument() +.moveStartToStartOfInline() +.moveStartToStartOfNextBlock() +.moveStartToStartOfNextInline() +.moveStartToStartOfNextText() +.moveStartToStartOfNode(inline) +.moveStartToStartOfPreviousBlock() +.moveStartToStartOfPreviousInline() +.moveStartToStartOfPreviousText() +.moveStartToStartOfText() +.moveTo("a", 0) +.moveToAnchor() +.moveToEnd() +.moveToEndOfBlock() +.moveToEndOfDocument() +.moveToEndOfInline() +.moveToEndOfNextBlock() +.moveToEndOfNextInline() +.moveToEndOfNextText() +.moveToEndOfNode(inline) +.moveToEndOfPreviousBlock() +.moveToEndOfPreviousInline() +.moveToEndOfPreviousText() +.moveToEndOfText() +.moveToFocus() +.moveToRangeOf(inline) +.moveToRangeOfDocument() +.moveToStart() +.moveToStartOfBlock() +.moveToStartOfDocument() +.moveToStartOfInline() +.moveToStartOfNextBlock() +.moveToStartOfNextInline() +.moveToStartOfNextText() +.moveToStartOfNode(inline) +.moveToStartOfPreviousBlock() +.moveToStartOfPreviousInline() +.moveToStartOfPreviousText() +.moveToStartOfText() +.normalize() +.redo() +.removeMark("bold") +.removeMarkAtRange(range, "bold") +.removeMarkByKey("a", 0, 1, "bold") +.removeMarkByPath("a", 0, 1, "bold") +.removeNodeByKey("b") +.removeNodeByPath("b") +.removeTextByKey("a", 0, 1) +.removeTextByPath("a", 0, 1) +.replaceMark("bold", "italic") +.replaceNodeByKey("a", inline) +.replaceNodeByPath("a", inline) +.select(range) +.setBlocks("paragraph") +.setBlocksAtRange(range, "paragraph") +.setInlines("paragraph") +.setInlinesAtRange(range, "paragraph") +.setMarkByKey("a", 0, 1, mark, { type: "bold" }) +.setMarksByPath("a", 0, 1, mark, { type: "bold" }) +.setNodeByKey("a", "paragraph") +.setNodeByPath("a", "paragraph") +.setReadOnly(true) +.setValue(value) +.snapshotSelection() +.splitBlock(0) +.splitBlockAtRange(range, 0) +.splitInline(0) +.splitInlineAtRange(range, 0) +.splitNodeByKey("a", 0) +.splitNodeByPath("a", 0) +.toggleMark("bold") +.toggleMarkAtRange(range, "bold") +.undo() +.unwrapBlock("paragraph") +.unwrapBlockAtRange(range, "paragraph") +.unwrapBlockByKey("a", "paragraph") +.unwrapBlockByPath("a", "paragraph") +.unwrapInline("paragraph") +.unwrapInlineAtRange(range, "paragraph") +.unwrapInlineByKey("a", "paragraph") +.unwrapInlineByPath("a", "paragraph") +.unwrapNodeByKey("a") +.unwrapNodeByPath("a") +.withoutMerging(() => { /* noop */ }) +.withoutNormalization(() => { /* noop */ }) +.withoutSaving(() => { /* noop */ }) +.wrapBlock("paragraph") +.wrapBlockAtRange(range, "paragraph") +.wrapBlockByKey("a", "paragraph") +.wrapBlockByPath("a", "paragraph") +.wrapInline("paragraph") +.wrapInlineAtRange(range, "paragraph") +.wrapInlineByKey("a", "paragraph") +.wrapInlineByPath("a", "paragraph") +.wrapNodeByKey("a", inline) +.wrapNodeByPath("a", inline) +.wrapText("a", "b") +.wrapTextAtRange(range, "a"); KeyUtils.setGenerator(() => "Test"); KeyUtils.create(); From 77440a637fad9aa9b9938b58f2854289789689dc Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 12:50:40 +0000 Subject: [PATCH 0149/1121] fix slate-react tests --- types/slate-react/slate-react-tests.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/slate-react/slate-react-tests.tsx b/types/slate-react/slate-react-tests.tsx index f763ff9b5e..64f1256668 100644 --- a/types/slate-react/slate-react-tests.tsx +++ b/types/slate-react/slate-react-tests.tsx @@ -1,9 +1,10 @@ import { Editor, Plugin, EditorProps, RenderNodeProps } from "slate-react"; -import { Value } from "slate"; +import { Value, Editor as Controller, Operation } from "slate"; import * as React from "react"; +import * as Immutable from "immutable"; class MyPlugin implements Plugin { - renderNode(props: RenderNodeProps, next: () => void) { + renderNode(props: RenderNodeProps, editor: Controller, next: () => void) { const { node } = props; if (node) { switch (node.object) { @@ -18,6 +19,9 @@ class MyPlugin implements Plugin { } } } + onChange = (operations: Immutable.List, value: Value) => { + console.log(value); + } } const myPlugin = new MyPlugin(); @@ -36,6 +40,7 @@ class MyEditor extends React.Component { render() { return ; + renderNode={ myPlugin.renderNode } + onChange={ myPlugin.onChange }/>; } } From 975e8f9d112b445f9a10781dfc39eae4a43dc0ad Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 13:29:39 +0000 Subject: [PATCH 0150/1121] Revert unintended change --- types/slate-react/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index c701f6f5e7..187bdd0689 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -40,7 +40,7 @@ export interface RenderMarkProps { } export interface RenderNodeProps { - attributes: object; + attributes: RenderAttributes; children: React.ReactNode; editor: Controller; isFocused: boolean; From 24c1321b1adf0888be2840ab300d1559a9216382 Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 13:32:15 +0000 Subject: [PATCH 0151/1121] version number --- types/slate/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 7d5eb5ce34..e4a71d52d2 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for slate 0.43 +// Type definitions for slate 0.43.0 // Project: https://github.com/ianstormtaylor/slate // Definitions by: Andy Kent // Jamie Talbot From 33c942bb0e0b3a1dbb9e713a6a36270e66e290a5 Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 13:46:35 +0000 Subject: [PATCH 0152/1121] Revert "version number" This reverts commit 24c1321b1adf0888be2840ab300d1559a9216382. --- types/slate/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index e4a71d52d2..7d5eb5ce34 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for slate 0.43.0 +// Type definitions for slate 0.43 // Project: https://github.com/ianstormtaylor/slate // Definitions by: Andy Kent // Jamie Talbot From e4eeaf874062b5b13b6dab14d79a2c760b364c73 Mon Sep 17 00:00:00 2001 From: Laurens Rietveld Date: Wed, 31 Oct 2018 15:15:48 +0100 Subject: [PATCH 0153/1121] Use single generic for I/O types of datafactory functions --- types/rdf-js/index.d.ts | 4 ++-- types/rdf-js/rdf-js-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/rdf-js/index.d.ts b/types/rdf-js/index.d.ts index 41491d8d09..964f042134 100644 --- a/types/rdf-js/index.d.ts +++ b/types/rdf-js/index.d.ts @@ -297,7 +297,7 @@ export interface DataFactory { * @see Triple * @see DefaultGraph */ - triple(subject: Q_In['subject'], predicate: Q_In['predicate'], object: Q_In['object']): Q_Out; + triple(subject: Q['subject'], predicate: Q['predicate'], object: Q['object']): Q; /** * @param subject The quad subject term. @@ -307,7 +307,7 @@ export interface DataFactory { * @return A new instance of Quad. * @see Quad */ - quad(subject: Q_In['subject'], predicate: Q_In['predicate'], object: Q_In['object'], graph?: Q_In['graph']): Q_Out; + quad(subject: Q['subject'], predicate: Q['predicate'], object: Q['object'], graph?: Q['graph']): Q; } /* Stream Interfaces */ diff --git a/types/rdf-js/rdf-js-tests.ts b/types/rdf-js/rdf-js-tests.ts index eb55002149..12b92b952d 100644 --- a/types/rdf-js/rdf-js-tests.ts +++ b/types/rdf-js/rdf-js-tests.ts @@ -77,7 +77,7 @@ function test_datafactory() { object: Term; graph: Term; } - const quad = dataFactory.quad(literal1, blankNode1, term, term); + const quad = dataFactory.quad(literal1, blankNode1, term, term); const hasBnode = quad.predicate.termType === "BlankNode"; } From d67d2fbad20823a264384537f09af60aa2f9e1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Moln=C3=A1r?= Date: Wed, 31 Oct 2018 15:22:57 +0100 Subject: [PATCH 0154/1121] intl-tel-input: moved old version to subfolder in preparation for v14 --- types/intl-tel-input/v13/index.d.ts | 260 ++++++++++++++++++ .../v13/intl-tel-input-tests.ts | 70 +++++ types/intl-tel-input/v13/tsconfig.json | 27 ++ types/intl-tel-input/v13/tslint.json | 80 ++++++ 4 files changed, 437 insertions(+) create mode 100644 types/intl-tel-input/v13/index.d.ts create mode 100644 types/intl-tel-input/v13/intl-tel-input-tests.ts create mode 100644 types/intl-tel-input/v13/tsconfig.json create mode 100644 types/intl-tel-input/v13/tslint.json diff --git a/types/intl-tel-input/v13/index.d.ts b/types/intl-tel-input/v13/index.d.ts new file mode 100644 index 0000000000..34493a8b75 --- /dev/null +++ b/types/intl-tel-input/v13/index.d.ts @@ -0,0 +1,260 @@ +// Type definitions for intl-tel-input +// Project: https://github.com/jackocnr/intl-tel-input +// Definitions by: Fidan Hakaj , Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace IntlTelInput { + + interface Plugin { + /** + * Get all of the plugin's country data - either to re-use elsewhere + * e.g. to populate a country dropdown. + */ + getCountryData(): CountryData[]; + /** + * Load the utils.js script (included in the lib directory) to enable + * formatting/validation etc. + */ + loadUtils(path: string, utilsScriptDeferred?: boolean): void; + + /** + * Remove the plugin from the input, and unbind any event listeners. + */ + (method: 'destroy'): void; + /** + * Get the extension from the current number. + * Requires the utilsScript option. + * e.g. if the input value was "(702) 555-5555 ext. 1234", this would + * return "1234". + */ + (method: 'getExtension'): string; + /** + * Get the current number in the given format (defaults to E.164 standard). + * The different formats are available in the enum + * intlTelInputUtils.numberFormat - taken from here. + * Requires the utilsScript option. + * Note that even if nationalMode is enabled, this can still return a full + * international number. + */ + (method: 'getNumber'): string; + /** + * Get the type (fixed-line/mobile/toll-free etc) of the current number. + * Requires the utilsScript option. + * Returns an integer, which you can match against the various options in the + * global enum intlTelInputUtils.numberType. + * Note that in the US there's no way to differentiate between fixed-line and + * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE. + */ + (method: 'getNumberType'): intlTelInputUtils.numberType; + /** + * Get the country data for the currently selected flag. + */ + (method: 'getSelectedCountryData'): IntlTelInput.CountryData; + /** + * Get more information about a validation error. + * Requires the utilsScript option. + * Returns an integer, which you can match against the various options in the + * global enum intlTelInputUtils.validationError + */ + (method: 'getValidationError'): intlTelInputUtils.validationError; + /** + * Validate the current number. Expects an internationally formatted number + * (unless nationalMode is enabled). If validation fails, you can use + * getValidationError to get more information. + * Requires the utilsScript option. + * Also see getNumberType if you want to make sure the user enters a certain + * type of number e.g. a mobile number. + */ + (method: 'isValidNumber'): boolean; + (method: string): void; + /** + * Change the country selection (e.g. when the user is entering their address). + * @param countryCode country code of the country to be set. + */ + (method: 'setCountry', countryCode: string): void; + /** + * Insert a number, and update the selected flag accordingly. + * Note that by default, if nationalMode is enabled it will try to use + * national formatting. + * @param aNumber number to be set. + */ + (method: 'setNumber', aNumber: string): void; + (method: string, value: string): void; + + /** + * Get the current number in the given format (defaults to E.164 standard). + * The different formats are available in the enum + * intlTelInputUtils.numberFormat - taken from here. + * Requires the utilsScript option. + * Note that even if nationalMode is enabled, this can still return a full + * international number. + * @param numberFormat the format in which the number will be returned. + */ + (method: 'getNumber', numberFormat: intlTelInputUtils.numberFormat): string; + (method: string, numberFormat: intlTelInputUtils.numberFormat): string; + + /** + * initialise the plugin with optional options. + * @param options options that can be provided during initialization. + */ + (options?: IntlTelInput.Options): JQueryDeferred; + } + + interface Options { + /** + * Whether or not to allow the dropdown. If disabled, there is no dropdown + * arrow, and the selected flag is not clickable. Also we display the + * selected flag on the right instead because it is just a marker of state. + */ + allowDropdown?: boolean; + /** + * If there is just a dial code in the input: remove it on blur or submit, + * and re-add it on focus. This is to prevent just a dial code getting + * submitted with the form. Requires nationalMode to be set to false. + */ + autoHideDialCode?: boolean; + /** + * Set the input's placeholder to an example number for the selected country. + * You can specify the number type using the numberType option. + * If there is already a placeholder attribute set on the input then that + * will take precedence. Requires the utilsScript option. + */ + autoPlaceholder?: boolean; + /** + * Change the placeholder generated by autoPlaceholder. Must return a string. + */ + customPlaceholder?: (selectedCountryPlaceholder: string, selectedCountryData: CountryData) => string; + /** + * Specify the container for the country dropdown (use a jQuery selector + * e.g. "body"). This is useful when the input is within a scrolling element, + * or an element with overflow: hidden. Wherever you put the dropdown it + * will automatically close on the window scroll event to prevent positioning + * issues. If you want it to close when a different element is scrolled + * (such as the input's parent), simply listen for the that scroll event, + * and trigger $(window).scroll() e.g. + */ + dropdownContainer?: string; + /** + * Don't display the countries you specify. + */ + excludeCountries?: Array; + /** + * Format the input value during initialisation. + */ + formatOnInit?: boolean; + /** + * When setting initialCountry to "auto", you must use this option to + * specify a custom function that looks up the user's location. Also note + * that when instantiating the plugin, we now return a deferred object, so + * you can use .done(callback) to know when initialisation requests like + * this have completed. + * Note that the callback must still be called in the event of an error. + */ + geoIpLookup?: (callback: (countryCode: string) => void) => void; + /** + * Set the initial country selection by specifying it's country code. + * You can also set it to "auto", which will lookup the user's country based + * on their IP address (requires the geoIpLookup option). + * Note that the "auto" option will not update the country selection if the + * input already contains a number. If you leave initialCountry blank, + * it will default to the first country in the list. + */ + initialCountry?: string; + /** + * Allow users to enter national numbers (and not have to think about + * international dial codes). Formatting, validation and placeholders still + * work. Then you can use getNumber to extract a full international number. + * This option now defaults to true, and it is recommended that you leave it + * that way as it provides a better experience for the user. + */ + nationalMode?: boolean; + /** + * Display only the countries you specify. + */ + onlyCountries?: Array; + /** + * Specify one of the keys from the global enum intlTelInputUtils.numberType + * e.g. "FIXED_LINE" to set the number type to use for the placeholder. + */ + placeholderNumberType?: + | "FIXED_LINE_OR_MOBILE" + | "FIXED_LINE" + | "MOBILE" + | "PAGER" + | "PERSONAL_NUMBER" + | "PREMIUM_RATE" + | "SHARED_COST" + | "TOLL_FREE" + | "UAN" + | "UNKNOWN" + | "VOICEMAIL" + | "VOIP"; + /** + * Specify the countries to appear at the top of the list. + */ + preferredCountries?: Array; + /** + * Display the country dial code next to the selected flag so it's not part + * of the typed number. Note that this will disable nationalMode because + * technically we are dealing with international numbers, but with the + * dial code separated. + */ + separateDialCode?: boolean; + /** + * Enable formatting/validation etc. by specifying the path to the included + * utils.js script, which is fetched only when the page has finished loading + * (on window.load) to prevent blocking. When instantiating the plugin, + * we return a deferred object, so you can use .done(callback) to know when + * initialisation requests like this have finished. Note that if you're + * lazy loading the plugin script itself (intlTelInput.js) this will not + * work and you will need to use the loadUtils method instead. + */ + utilsScript?: string; + } + + interface CountryData { + name: string; + iso2: string; + dialCode: string; + } +} + +declare namespace intlTelInputUtils { + + const enum numberFormat { + E164 = 0, + INTERNATIONAL = 1, + NATIONAL = 2, + RFC3966 = 3 + } + + const enum numberType { + FIXED_LINE = 0, + MOBILE = 1, + FIXED_LINE_OR_MOBILE = 2, + TOLL_FREE = 3, + PREMIUM_RATE = 4, + SHARED_COST = 5, + VOIP = 6, + PERSONAL_NUMBER = 7, + PAGER = 8, + UAN = 9, + VOICEMAIL = 10, + UNKNOWN = -1 + } + + const enum validationError { + IS_POSSIBLE = 0, + INVALID_COUNTRY_CODE = 1, + TOO_SHORT = 2, + TOO_LONG = 3, + NOT_A_NUMBER = 4 + } +} + +interface JQuery { + intlTelInput: IntlTelInput.Plugin; +} diff --git a/types/intl-tel-input/v13/intl-tel-input-tests.ts b/types/intl-tel-input/v13/intl-tel-input-tests.ts new file mode 100644 index 0000000000..e91a5deef1 --- /dev/null +++ b/types/intl-tel-input/v13/intl-tel-input-tests.ts @@ -0,0 +1,70 @@ +$('#phone').intlTelInput(); + +$('#phone').intlTelInput({ + customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) { + return 'e.g. ' + selectedCountryPlaceholder; + } +}); + +$('#phone').intlTelInput({ + placeholderNumberType: "MOBILE", +}); + +$('#phone').intlTelInput({ + geoIpLookup: function(callback) { + $.get('http://ipinfo.io', function() {}, 'jsonp').always(function(resp) { + let countryCode = (resp && resp.country) ? resp.country : ''; + callback(countryCode); + }); + } +}); + +$('#phone').intlTelInput('destroy'); + +let extension = $('#phone').intlTelInput('getExtension'); + +let intlNumber = $('#phone').intlTelInput('getNumber'); +let ntlNumber = $('#phone').intlTelInput('getNumber', intlTelInputUtils.numberFormat.NATIONAL); + +let numberType = $('#phone').intlTelInput('getNumberType'); +if (numberType === intlTelInputUtils.numberType.MOBILE) {} + +let selectedCountryData = $('#phone').intlTelInput('getSelectedCountryData'); + +let error = $('#phone').intlTelInput('getValidationError'); +if (error === intlTelInputUtils.validationError.TOO_SHORT) {} + +let isValid = $('#phone').intlTelInput('isValidNumber'); + +$('#phone').intlTelInput('setCountry', 'gb'); + +$('#phone').intlTelInput('setNumber', '+447733123456'); + +let countryData = $.fn.intlTelInput.getCountryData(); + +$.fn.intlTelInput.loadUtils('build/js/utils.js'); + +$('#phone').intlTelInput({ + utilsScript: '../../build/js/utils.js' +}); + +$('#phone').intlTelInput({ + initialCountry: 'auto', + geoIpLookup: function(callback) { + $.get('http://ipinfo.io', function() {}, 'jsonp').always(function(resp) { + let countryCode = (resp && resp.country) ? resp.country : ''; + callback(countryCode); + }); + }, + utilsScript: '../../build/js/utils.js' +}); + +$('#phone').intlTelInput({ + nationalMode: true, + utilsScript: '../../build/js/utils.js' +}); + +$('#phone').intlTelInput({ + onlyCountries: ['al'], + utilsScript: '../../build/js/utils.js' +}); diff --git a/types/intl-tel-input/v13/tsconfig.json b/types/intl-tel-input/v13/tsconfig.json new file mode 100644 index 0000000000..b7e1b435b1 --- /dev/null +++ b/types/intl-tel-input/v13/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "intl-tel-input": [ "intl-tel-input/v13" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "intl-tel-input-tests.ts" + ] +} \ No newline at end of file diff --git a/types/intl-tel-input/v13/tslint.json b/types/intl-tel-input/v13/tslint.json new file mode 100644 index 0000000000..b6afb8acee --- /dev/null +++ b/types/intl-tel-input/v13/tslint.json @@ -0,0 +1,80 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-const-enum": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} From da4346e58a177150a4855a2c5c150b2688da7ac6 Mon Sep 17 00:00:00 2001 From: licui Date: Wed, 31 Oct 2018 11:07:13 -0400 Subject: [PATCH 0155/1121] Update windowOption and applicationOption shapes from v1 to v2 --- .../_v2/api/application/application.d.ts | 5 +- .../api/application/applicationOption.d.ts | 50 ++++ types/openfin/_v2/api/window/anchor-type.d.ts | 1 + types/openfin/_v2/api/window/window.d.ts | 20 +- .../openfin/_v2/api/window/windowOption.d.ts | 46 ++++ types/openfin/index.d.ts | 236 +----------------- 6 files changed, 121 insertions(+), 237 deletions(-) create mode 100644 types/openfin/_v2/api/application/applicationOption.d.ts create mode 100644 types/openfin/_v2/api/window/anchor-type.d.ts create mode 100644 types/openfin/_v2/api/window/windowOption.d.ts diff --git a/types/openfin/_v2/api/application/application.d.ts b/types/openfin/_v2/api/application/application.d.ts index 8470f65f55..37263a9a63 100644 --- a/types/openfin/_v2/api/application/application.d.ts +++ b/types/openfin/_v2/api/application/application.d.ts @@ -6,6 +6,7 @@ import { MonitorInfo } from '../system/monitor'; import Transport from '../../transport/transport'; import Bounds from '../window/bounds'; import { ApplicationEvents } from '../events/application'; +import { ApplicationOption } from './applicationOption'; export interface TrayIconClickReply extends Point, Reply<'application', 'tray-icon-clicked'> { button: number; monitorInfo: MonitorInfo; @@ -55,12 +56,12 @@ export default class ApplicationModule extends Base { wrapSync(identity: Identity): Application; /** * Creates a new Application. - * @param {*} appOptions + * @param { ApplicationOption } appOptions * @return {Promise.} * @tutorial Application.create * @static */ - create(appOptions: any): Promise; + create(appOptions: ApplicationOption): Promise; /** * Asynchronously returns an Application object that represents the current application * @return {Promise.} diff --git a/types/openfin/_v2/api/application/applicationOption.d.ts b/types/openfin/_v2/api/application/applicationOption.d.ts new file mode 100644 index 0000000000..134e4482d6 --- /dev/null +++ b/types/openfin/_v2/api/application/applicationOption.d.ts @@ -0,0 +1,50 @@ +import { WindowOption, CustomRequestHeaders } from '../window/windowOption'; +import { DownloadPreloadOption } from '../system/download-preload'; +export interface ApplicationOption { + disableIabSecureLogging?: boolean; + loadErrorMessage?: string; + mainWindowOptions?: WindowOption; + name?: string; + nonPersistent?: boolean; + plugins?: boolean; + spellCheck?: boolean; + url?: string; + uuid: string; + webSecurity?: boolean; + accelerator?: object; + alwaysOnTop?: boolean; + api?: object; + aspectRatio?: number; + autoShow?: boolean; + backgroundColor?: string; + contentNavigation?: object; + contextMenu?: boolean; + cornerRounding?: object; + customData?: string; + customRequestHeaders?: Array; + defaultCentered?: boolean; + defaultHeight?: number; + defaultLeft?: number; + defaultTop?: number; + defaultWidth?: number; + frame?: boolean; + hideOnClose?: boolean; + icon?: string; + maxHeight?: number; + maximizable?: boolean; + maxWidth?: number; + minHeight?: number; + minimizable?: boolean; + minWidth?: number; + opacity?: number; + preloadScripts?: Array; + resizable?: boolean; + resizeRegion?: object; + saveWindowState?: boolean; + shadow?: boolean; + showTaskbarIcon?: boolean; + smallWindow?: boolean; + state?: string; + taskbarIconGroup?: string; + waitForPageLoad?: boolean; +} diff --git a/types/openfin/_v2/api/window/anchor-type.d.ts b/types/openfin/_v2/api/window/anchor-type.d.ts new file mode 100644 index 0000000000..4e09af40ab --- /dev/null +++ b/types/openfin/_v2/api/window/anchor-type.d.ts @@ -0,0 +1 @@ +export declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; diff --git a/types/openfin/_v2/api/window/window.d.ts b/types/openfin/_v2/api/window/window.d.ts index ff89a89051..fcefc4fa5d 100644 --- a/types/openfin/_v2/api/window/window.d.ts +++ b/types/openfin/_v2/api/window/window.d.ts @@ -5,6 +5,8 @@ import { Transition, TransitionOptions } from './transition'; import { Application } from '../application/application'; import Transport from '../../transport/transport'; import { WindowEvents } from '../events/window'; +import { AnchorType } from './anchor-type'; +import { WindowOption } from './windowOption'; /** * @lends Window */ @@ -27,12 +29,12 @@ export default class _WindowModule extends Base { wrapSync(identity: Identity): _Window; /** * Creates a new Window. - * @param { * } options - Window creation options + * @param { WindowOption } options - Window creation options * @return {Promise.<_Window>} * @tutorial Window.create * @static */ - create(options: any): Promise<_Window>; + create(options: WindowOption): Promise<_Window>; /** * Asynchronously returns a Window object that represents the current window * @return {Promise.<_Window>} @@ -459,7 +461,7 @@ export declare class _Window extends EmitterBase { "load-failed", "failed", "succeeded" */ constructor(wire: Transport, identity: Identity); - createWindow(options: any): Promise<_Window>; + createWindow(options: WindowOption): Promise<_Window>; private windowListFromNameList; /** * Retrieves an array of frame info objects representing the main frame and any @@ -663,24 +665,24 @@ export declare class _Window extends EmitterBase { * Resizes the window by a specified amount. * @param { number } deltaWidth The change in the width of the window * @param { number } deltaHeight The change in the height of the window - * @param { string } anchor Specifies a corner to remain fixed during the resize. - * Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right." + * @param { AnchorType } anchor Specifies a corner to remain fixed during the resize. + * Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". * If undefined, the default is "top-left" * @return {Promise.} * @tutorial Window.resizeBy */ - resizeBy(deltaWidth: number, deltaHeight: number, anchor: string): Promise; + resizeBy(deltaWidth: number, deltaHeight: number, anchor: AnchorType): Promise; /** * Resizes the window to the specified dimensions. * @param { number } width The change in the width of the window * @param { number } height The change in the height of the window - * @param { string } anchor Specifies a corner to remain fixed during the resize. - * Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right." + * @param { AnchorType } anchor Specifies a corner to remain fixed during the resize. + * Can take the values: "top-left", "top-right", "bottom-left", or "bottom-right". * If undefined, the default is "top-left" * @return {Promise.} * @tutorial Window.resizeTo */ - resizeTo(width: number, height: number, anchor: string): Promise; + resizeTo(width: number, height: number, anchor: AnchorType): Promise; /** * Restores the window to its normal state (i.e., unminimized, unmaximized). * @return {Promise.} diff --git a/types/openfin/_v2/api/window/windowOption.d.ts b/types/openfin/_v2/api/window/windowOption.d.ts new file mode 100644 index 0000000000..faab275187 --- /dev/null +++ b/types/openfin/_v2/api/window/windowOption.d.ts @@ -0,0 +1,46 @@ +import { DownloadPreloadOption } from '../system/download-preload'; +export interface WindowOption { + accelerator?: object; + alwaysOnTop?: boolean; + api?: object; + aspectRatio?: number; + autoShow?: boolean; + backgroundColor?: string; + contentNavigation?: object; + contextMenu?: boolean; + cornerRounding?: object; + customData?: string; + customRequestHeaders?: Array; + defaultCentered?: boolean; + defaultHeight?: number; + defaultLeft?: number; + defaultTop?: number; + defaultWidth?: number; + frame?: boolean; + hideOnClose?: boolean; + icon?: string; + maxHeight?: number; + maximizable?: boolean; + maxWidth?: number; + minHeight?: number; + minimizable?: boolean; + minWidth?: number; + name?: string; + opacity?: number; + preloadScripts?: Array; + resizable?: boolean; + resizeRegion?: object; + saveWindowState?: boolean; + shadow?: boolean; + showTaskbarIcon?: boolean; + smallWindow?: boolean; + state?: string; + taskbarIconGroup?: string; + url?: string; + uuid?: string; + waitForPageLoad?: boolean; +} +export interface CustomRequestHeaders { + urlPatterns: Array; + headers: Array; +} diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index 139c874cab..b77b91eba5 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -25,7 +25,8 @@ * without the need to include additional source files. You can treat the "fin" namespace as you would the "window", "navigator" or "documennt" objects. */ import { Identity } from './_v2/identity'; -import { ShortCutConfig, TrayInfo } from './_v2/api/application/application'; +import { ApplicationInfo as LaunchInfo, ShortCutConfig, TrayInfo } from './_v2/api/application/application'; +import { ApplicationOption } from './_v2/api/application/applicationOption'; import { ExternalApplicationInfo } from './_v2/api/external-application/external-application'; import { ApplicationInfo } from './_v2/api/system/application'; import { ClearCacheOption } from './_v2/api/system/clearCacheOption'; @@ -42,8 +43,10 @@ import { ProxyInfo } from './_v2/api/system/proxy'; import { RegistryInfo } from './_v2/api/system/registry-info'; import { RVMInfo} from './_v2/api/system/rvm'; import { WindowDetail, WindowInfo } from './_v2/api/system/window'; +import { AnchorType } from './_v2/api/window/anchor-type'; import Bounds from './_v2/api/window/bounds'; import { Transition, TransitionOptions } from './_v2/api/window/transition'; +import { WindowOption } from './_v2/api/window/windowOption'; // tslint:disable-next-line:export-just-namespace export = fin; @@ -79,7 +82,7 @@ declare namespace fin { * An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events. */ new ( - options: ApplicationOptions, + options: ApplicationOption, callback?: (successObj: { httpResponseCode: number }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinApplication; /** @@ -227,192 +230,6 @@ declare namespace fin { message: string; } - interface ApplicationOptions { - /** - * The name of the application. - */ - name?: string; - /** - * The url to the application. - */ - url?: string; - /** - * The UUID of the application, unique within the set of all other applications running in the OpenFin Runtime. name and uuid must match. - */ - uuid?: string; - /** - * Enable Flash at the application level. Default: false. - */ - plugins?: boolean; - /** - * The options of the main window of the application. - */ - mainWindowOptions?: WindowOptions; - } - - interface WindowOptions { - /** - * Enable keyboard shortcuts for devtools and zoom. Default: false for both. - */ - accelerator?: { - devtools?: boolean, - zoom?: boolean, - reload?: boolean, - reloadIgnoreCache?: boolean, - }; - /** - * A flag to always position the window at the top of the window stack. Default: false. - * Updatable - */ - alwaysOnTop?: boolean; - /** - * A flag to automatically show the Window when it is created. Default: false. - */ - autoShow?: boolean; - /** - * A flag to show the context menu when right-clicking on a window. Gives access to the Developer Console for the Window. Default: true - * Updatable - */ - contextMenu?: boolean; - /** - * This defines and applies rounded corners for a frameless window. Default for both width and height: 0. - * Updatable - */ - cornerRounding?: { - width?: number; - height?: number; - }; - /** - * A field that the user can attach serializable data to to be ferried around with the window options. Default: ''. - */ - customData?: any; - /** - * Specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. - * When the window corresponding to that id is loaded again, the position from before the window was closed is used. - * This option overrides defaultLeft and defaultTop. Default: false. - */ - defaultCentered?: boolean; - /** - * The default height of the window. Specifies the height of the window when loaded for the first time on a machine. - * When the window corresponding to that id is loaded again, the height is taken to be the last height of the window before it was closed. Default: 500. - */ - defaultHeight?: number; - /** - * The default left position of the window. Specifies the position of the left of the window when loaded for the first time on a machine. - * When the window corresponding to that id is loaded again, the value of left is taken to be the last value before the window was closed. Default: 100. - */ - defaultWidth?: number; - /** - * The default top position of the window. Specifies the position of the top of the window when loaded for the first time on a machine. - * When the window corresponding to that id is loaded again, the value of top is taken to be the last value before the window was closed. Default: 100. - */ - defaultTop?: number; - /** - * The default width of the window. Specifies the width of the window when loaded for the first time on a machine. - * When the window corresponding to that id is loaded again, the width is taken to be the last width of the window before it was closed. Default: 800. - */ - defaultLeft?: number; - /** - * A flag to show the frame. Default: true. - * Updatable - */ - frame?: boolean; - /** - * A flag to allow a window to be hidden when the close button is clicked.Default: false. - * Updatable - */ - hideOnClose?: boolean; - /** - * A URL for the icon to be shown in the window title bar and the taskbar.Default: The parent application's applicationIcon. - * Updatable - */ - icon?: string; - /** - * The maximum height of a window.Will default to the OS defined value if set to - 1. Default: -1. - * Updatable - */ - maxHeight?: number; - /** - * A flag that lets the window be maximized.Default: true. - * Updatable - */ - maximizable?: boolean; - /** - * The maximum width of a window.Will default to the OS defined value if set to - 1. Default: -1. - * Updatable - */ - maxWidth?: number; - /** - * The minimum height of a window.Default: 0. - * Updatable - */ - minHeight?: number; - /** - * A flag that lets the window be minimized.Default: true. - */ - minimizable?: boolean; - /** - * The minimum width of a window.Default: 0. - */ - minWidth?: number; - /** - * The name for the window which must be unique within the context of the invoking Application. - */ - name?: string; - /** - * A flag that specifies how transparent the window will be.This value is clamped between 0.0 and 1.0.Default: 1.0. - * Updatable - */ - opacity?: number; - /** - * A flag to drop to allow the user to resize the window.Default: true. - * Updatable - */ - resizable?: boolean; - /** - * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window. - * Updatable - */ - resizeRegion?: { - /** - * The size in pixels (Default: 2), - */ - size?: number; - /** - * The size in pixels of an additional - * square resizable region located at the - * bottom right corner of a - * frameless window. (Default: 4) - */ - bottomRightCorner?: number; - }; - /** - * A flag to show the Window's icon in the taskbar. Default: true. - */ - showTaskbarIcon?: boolean; - /** - * A flag to cache the location of the window or not. Default: true. - */ - saveWindowState?: boolean; - /** - * Specify a taskbar group for the window. Default: app's uuid. - */ - taskbarIconGroup?: string; - /** - * A string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal". - */ - state?: string; - /** - * The URL of the window. Default: "about:blank". - */ - url?: string; - /** - * When set to false, the window will render before the "load" event is fired on the content's window. - * Caution, when false you will see an initial empty white window. Default: true. - */ - waitForPageLoad?: boolean; - } - /** * Clipboard * Clipboard API allows reading and writting to the clipboard in multiple formats. @@ -930,7 +747,7 @@ declare namespace fin { * @param [callback.successObj] - httpResponseCode */ new ( - options: WindowOptions, + options: WindowOption, callback?: (successObj: { httpResponseCode: number }) => void, errorCallback?: (reason: string, errorObj: NetworkErrorInfo) => void): OpenFinWindow; /** @@ -1047,7 +864,7 @@ declare namespace fin { /** * Gets the current settings of the window. */ - getOptions(callback?: (options: WindowOptions) => void, errorCallback?: (reason: string) => void): void; + getOptions(callback?: (options: WindowOption) => void, errorCallback?: (reason: string) => void): void; /** * Gets a base64 encoded PNG snapshot of the window. */ @@ -1114,11 +931,11 @@ declare namespace fin { /** * Resizes the window by a specified amount. */ - resizeBy(deltaWidth: number, deltaHeight: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + resizeBy(deltaWidth: number, deltaHeight: number, anchor: AnchorType, callback?: () => void, errorCallback?: (reason: string) => void): void; /** * Resizes the window by a specified amount. */ - resizeTo(width: number, height: number, anchor: OpenFinAnchor, callback?: () => void, errorCallback?: (reason: string) => void): void; + resizeTo(width: number, height: number, anchor: AnchorType, callback?: () => void, errorCallback?: (reason: string) => void): void; /** * Restores the window to its normal state (i.e., unminimized, unmaximized). */ @@ -1151,7 +968,7 @@ declare namespace fin { /** * Updates the window using the passed options */ - updateOptions(options: WindowOptions, callback?: () => void, errorCallback?: (reason: string) => void): void; + updateOptions(options: WindowOption, callback?: () => void, errorCallback?: (reason: string) => void): void; } interface OpenFinFrameStatic { @@ -1432,34 +1249,6 @@ declare namespace fin { type: "session-changed"; } - interface LaunchInfo { - launchMode: "fin-protocol" - | "fins-protocol" - | "shortcut" - | "command-line" - | "adapter" - | "other" - | string; - } - - type OpenFinTweenType = "linear" - | "ease-in" - | "ease-out" - | "ease-in-out" - | "ease-in-quad" - | "ease-out-quad" - | "ease-in-out-quad" - | "ease-in-cubic" - | "ease-out-cubic" - | "ease-in-out-cubic" - | "ease-out-bounce" - | "ease-in-back" - | "ease-out-back" - | "ease-in-out-back" - | "ease-in-elastic" - | "ease-out-elastic" - | "ease-in-out-elastic"; - type OpenFinApplicationEventType = "closed" | "connected" | "crashed" @@ -1515,9 +1304,4 @@ declare namespace fin { | "restored" | "show-requested" | "shown"; - - type OpenFinAnchor = "top-left" - | "top-right" - | "bottom-left" - | "bottom-right"; } From a25d7799672222e2771c5bfe5c71a2a7d05cf768 Mon Sep 17 00:00:00 2001 From: Jake Chapman Date: Wed, 31 Oct 2018 08:36:59 -0700 Subject: [PATCH 0156/1121] Added definitions for 'react-native-flip-card' --- types/react-native-flip-card/index.d.ts | 46 +++++++++++++++++++ .../react-native-flip-card-tests.tsx | 33 +++++++++++++ types/react-native-flip-card/tsconfig.json | 24 ++++++++++ types/react-native-flip-card/tslint.json | 3 ++ 4 files changed, 106 insertions(+) create mode 100644 types/react-native-flip-card/index.d.ts create mode 100644 types/react-native-flip-card/react-native-flip-card-tests.tsx create mode 100644 types/react-native-flip-card/tsconfig.json create mode 100644 types/react-native-flip-card/tslint.json diff --git a/types/react-native-flip-card/index.d.ts b/types/react-native-flip-card/index.d.ts new file mode 100644 index 0000000000..6fc1156a1a --- /dev/null +++ b/types/react-native-flip-card/index.d.ts @@ -0,0 +1,46 @@ +// Type definitions for react-native-flip-card 3.5 +// Project: https://github.com/moschan/react-native-flip-card +// Definitions by: Jake Chapman +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Component, ReactNode, ComponentClass } from "react"; +import { + ViewProps, + TextProps, + StyleProp, + TextInputProps, + ViewStyle +} from "react-native"; + +// FlipCard +export interface FlipCardProps { + style?: StyleProp; + flip?: boolean; + friction?: number; + perspective?: number; + flipHorizontal?: boolean; + flipVertical?: boolean; + clickable?: boolean; + onFlipEnd?: () => void; + onFlipStart?: () => void; + alignHeight?: boolean; + alignWidth?: boolean; + useNativeDriver?: boolean; +} +// Face +export interface FaceProps { + chilren: JSX.Element[]; +} + +// Back +export interface BackProps { + flipHorizontal: boolean; + flipVertical: boolean; + perspective: number; + chilren: JSX.Element[]; +} + +export const Face: ComponentClass; +export const Back: ComponentClass; +export default class FlipCard extends Component {} diff --git a/types/react-native-flip-card/react-native-flip-card-tests.tsx b/types/react-native-flip-card/react-native-flip-card-tests.tsx new file mode 100644 index 0000000000..e741589be4 --- /dev/null +++ b/types/react-native-flip-card/react-native-flip-card-tests.tsx @@ -0,0 +1,33 @@ +import * as React from "react"; +import { View, Text, StyleSheet } from "react-native"; + +// Component +import FlipCard from "react-native-flip-card"; + +export default class FlipCardTest extends React.Component { + render() { + return ( + {}} + onFlipEnd={() => {}} + alignHeight={false} + alignWidth={false} + useNativeDriver={true} + > + + Front + + + Back + + + ); + } +} diff --git a/types/react-native-flip-card/tsconfig.json b/types/react-native-flip-card/tsconfig.json new file mode 100644 index 0000000000..92f1878d71 --- /dev/null +++ b/types/react-native-flip-card/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-native-flip-card-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-flip-card/tslint.json b/types/react-native-flip-card/tslint.json new file mode 100644 index 0000000000..30a1bdde2e --- /dev/null +++ b/types/react-native-flip-card/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file From 244f5c736bc818e276bb49240de4eb2e4b183236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Moln=C3=A1r?= Date: Wed, 31 Oct 2018 16:40:06 +0100 Subject: [PATCH 0157/1121] v14 type definition (tests still needed for new options) --- types/intl-tel-input/index.d.ts | 522 ++++++++++--------- types/intl-tel-input/intl-tel-input-tests.ts | 63 ++- types/intl-tel-input/tslint.json | 79 +-- 3 files changed, 308 insertions(+), 356 deletions(-) diff --git a/types/intl-tel-input/index.d.ts b/types/intl-tel-input/index.d.ts index 34493a8b75..b0752632c3 100644 --- a/types/intl-tel-input/index.d.ts +++ b/types/intl-tel-input/index.d.ts @@ -1,260 +1,290 @@ -// Type definitions for intl-tel-input +// Type definitions for intl-tel-input 14.0 // Project: https://github.com/jackocnr/intl-tel-input -// Definitions by: Fidan Hakaj , Leonard Thieu +// Definitions by: Fidan Hakaj , Leonard Thieu , Márton Molnár // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// +export interface IntlTelInputStatic { + /** + * Get all of the plugin's country data - either to re-use elsewhere + * e.g. to populate a country dropdown. + */ + getCountryData(): CountryData[]; -declare namespace IntlTelInput { + /** + * Load the utils.js script (included in the lib directory) to enable + * formatting/validation etc. + */ + loadUtils(path: string, utilsScriptDeferred?: boolean): void; - interface Plugin { - /** - * Get all of the plugin's country data - either to re-use elsewhere - * e.g. to populate a country dropdown. - */ - getCountryData(): CountryData[]; - /** - * Load the utils.js script (included in the lib directory) to enable - * formatting/validation etc. - */ - loadUtils(path: string, utilsScriptDeferred?: boolean): void; - - /** - * Remove the plugin from the input, and unbind any event listeners. - */ - (method: 'destroy'): void; - /** - * Get the extension from the current number. - * Requires the utilsScript option. - * e.g. if the input value was "(702) 555-5555 ext. 1234", this would - * return "1234". - */ - (method: 'getExtension'): string; - /** - * Get the current number in the given format (defaults to E.164 standard). - * The different formats are available in the enum - * intlTelInputUtils.numberFormat - taken from here. - * Requires the utilsScript option. - * Note that even if nationalMode is enabled, this can still return a full - * international number. - */ - (method: 'getNumber'): string; - /** - * Get the type (fixed-line/mobile/toll-free etc) of the current number. - * Requires the utilsScript option. - * Returns an integer, which you can match against the various options in the - * global enum intlTelInputUtils.numberType. - * Note that in the US there's no way to differentiate between fixed-line and - * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE. - */ - (method: 'getNumberType'): intlTelInputUtils.numberType; - /** - * Get the country data for the currently selected flag. - */ - (method: 'getSelectedCountryData'): IntlTelInput.CountryData; - /** - * Get more information about a validation error. - * Requires the utilsScript option. - * Returns an integer, which you can match against the various options in the - * global enum intlTelInputUtils.validationError - */ - (method: 'getValidationError'): intlTelInputUtils.validationError; - /** - * Validate the current number. Expects an internationally formatted number - * (unless nationalMode is enabled). If validation fails, you can use - * getValidationError to get more information. - * Requires the utilsScript option. - * Also see getNumberType if you want to make sure the user enters a certain - * type of number e.g. a mobile number. - */ - (method: 'isValidNumber'): boolean; - (method: string): void; - /** - * Change the country selection (e.g. when the user is entering their address). - * @param countryCode country code of the country to be set. - */ - (method: 'setCountry', countryCode: string): void; - /** - * Insert a number, and update the selected flag accordingly. - * Note that by default, if nationalMode is enabled it will try to use - * national formatting. - * @param aNumber number to be set. - */ - (method: 'setNumber', aNumber: string): void; - (method: string, value: string): void; - - /** - * Get the current number in the given format (defaults to E.164 standard). - * The different formats are available in the enum - * intlTelInputUtils.numberFormat - taken from here. - * Requires the utilsScript option. - * Note that even if nationalMode is enabled, this can still return a full - * international number. - * @param numberFormat the format in which the number will be returned. - */ - (method: 'getNumber', numberFormat: intlTelInputUtils.numberFormat): string; - (method: string, numberFormat: intlTelInputUtils.numberFormat): string; - - /** - * initialise the plugin with optional options. - * @param options options that can be provided during initialization. - */ - (options?: IntlTelInput.Options): JQueryDeferred; - } - - interface Options { - /** - * Whether or not to allow the dropdown. If disabled, there is no dropdown - * arrow, and the selected flag is not clickable. Also we display the - * selected flag on the right instead because it is just a marker of state. - */ - allowDropdown?: boolean; - /** - * If there is just a dial code in the input: remove it on blur or submit, - * and re-add it on focus. This is to prevent just a dial code getting - * submitted with the form. Requires nationalMode to be set to false. - */ - autoHideDialCode?: boolean; - /** - * Set the input's placeholder to an example number for the selected country. - * You can specify the number type using the numberType option. - * If there is already a placeholder attribute set on the input then that - * will take precedence. Requires the utilsScript option. - */ - autoPlaceholder?: boolean; - /** - * Change the placeholder generated by autoPlaceholder. Must return a string. - */ - customPlaceholder?: (selectedCountryPlaceholder: string, selectedCountryData: CountryData) => string; - /** - * Specify the container for the country dropdown (use a jQuery selector - * e.g. "body"). This is useful when the input is within a scrolling element, - * or an element with overflow: hidden. Wherever you put the dropdown it - * will automatically close on the window scroll event to prevent positioning - * issues. If you want it to close when a different element is scrolled - * (such as the input's parent), simply listen for the that scroll event, - * and trigger $(window).scroll() e.g. - */ - dropdownContainer?: string; - /** - * Don't display the countries you specify. - */ - excludeCountries?: Array; - /** - * Format the input value during initialisation. - */ - formatOnInit?: boolean; - /** - * When setting initialCountry to "auto", you must use this option to - * specify a custom function that looks up the user's location. Also note - * that when instantiating the plugin, we now return a deferred object, so - * you can use .done(callback) to know when initialisation requests like - * this have completed. - * Note that the callback must still be called in the event of an error. - */ - geoIpLookup?: (callback: (countryCode: string) => void) => void; - /** - * Set the initial country selection by specifying it's country code. - * You can also set it to "auto", which will lookup the user's country based - * on their IP address (requires the geoIpLookup option). - * Note that the "auto" option will not update the country selection if the - * input already contains a number. If you leave initialCountry blank, - * it will default to the first country in the list. - */ - initialCountry?: string; - /** - * Allow users to enter national numbers (and not have to think about - * international dial codes). Formatting, validation and placeholders still - * work. Then you can use getNumber to extract a full international number. - * This option now defaults to true, and it is recommended that you leave it - * that way as it provides a better experience for the user. - */ - nationalMode?: boolean; - /** - * Display only the countries you specify. - */ - onlyCountries?: Array; - /** - * Specify one of the keys from the global enum intlTelInputUtils.numberType - * e.g. "FIXED_LINE" to set the number type to use for the placeholder. - */ - placeholderNumberType?: - | "FIXED_LINE_OR_MOBILE" - | "FIXED_LINE" - | "MOBILE" - | "PAGER" - | "PERSONAL_NUMBER" - | "PREMIUM_RATE" - | "SHARED_COST" - | "TOLL_FREE" - | "UAN" - | "UNKNOWN" - | "VOICEMAIL" - | "VOIP"; - /** - * Specify the countries to appear at the top of the list. - */ - preferredCountries?: Array; - /** - * Display the country dial code next to the selected flag so it's not part - * of the typed number. Note that this will disable nationalMode because - * technically we are dealing with international numbers, but with the - * dial code separated. - */ - separateDialCode?: boolean; - /** - * Enable formatting/validation etc. by specifying the path to the included - * utils.js script, which is fetched only when the page has finished loading - * (on window.load) to prevent blocking. When instantiating the plugin, - * we return a deferred object, so you can use .done(callback) to know when - * initialisation requests like this have finished. Note that if you're - * lazy loading the plugin script itself (intlTelInput.js) this will not - * work and you will need to use the loadUtils method instead. - */ - utilsScript?: string; - } - - interface CountryData { - name: string; - iso2: string; - dialCode: string; - } + /** + * initialise the plugin with optional options. + * @param options options that can be provided during initialization. + */ + (node: Element, options?: IntlTelInputOptions): IntlTelInput; } -declare namespace intlTelInputUtils { +export interface IntlTelInput { + /** + * Remove the plugin from the input, and unbind any event listeners. + */ + destroy(): void; - const enum numberFormat { - E164 = 0, - INTERNATIONAL = 1, - NATIONAL = 2, - RFC3966 = 3 - } + /** + * Get the extension from the current number. + * Requires the utilsScript option. + * e.g. if the input value was "(702) 555-5555 ext. 1234", this would + * return "1234". + */ + getExtension(): string; - const enum numberType { - FIXED_LINE = 0, - MOBILE = 1, - FIXED_LINE_OR_MOBILE = 2, - TOLL_FREE = 3, - PREMIUM_RATE = 4, - SHARED_COST = 5, - VOIP = 6, - PERSONAL_NUMBER = 7, - PAGER = 8, - UAN = 9, - VOICEMAIL = 10, - UNKNOWN = -1 - } + /** + * Get the current number in the given format (defaults to E.164 standard). + * The different formats are available in the enum + * intlTelInputUtils.numberFormat - taken from here. + * Requires the utilsScript option. + * Note that even if nationalMode is enabled, this can still return a full + * international number. + * @param numberFormat the format in which the number will be returned. + */ + getNumber(numberFormat?: NumberFormat): string; - const enum validationError { - IS_POSSIBLE = 0, - INVALID_COUNTRY_CODE = 1, - TOO_SHORT = 2, - TOO_LONG = 3, - NOT_A_NUMBER = 4 - } + /** + * Get the type (fixed-line/mobile/toll-free etc) of the current number. + * Requires the utilsScript option. + * Returns an integer, which you can match against the various options in the + * global enum intlTelInputUtils.numberType. + * Note that in the US there's no way to differentiate between fixed-line and + * mobile numbers, so instead it will return FIXED_LINE_OR_MOBILE. + */ + getNumberType(): NumberType; + + /** + * Get the country data for the currently selected flag. + */ + getSelectedCountryData(): CountryData; + + /** + * Get more information about a validation error. + * Requires the utilsScript option. + * Returns an integer, which you can match against the various options in the + * global enum intlTelInputUtils.validationError + */ + getValidationError(): ValidationError; + + /** + * Validate the current number. Expects an internationally formatted number + * (unless nationalMode is enabled). If validation fails, you can use + * getValidationError to get more information. + * Requires the utilsScript option. + * Also see getNumberType if you want to make sure the user enters a certain + * type of number e.g. a mobile number. + */ + isValidNumber(): boolean; + + /** + * Change the country selection (e.g. when the user is entering their address). + * @param countryCode country code of the country to be set. + */ + setCountry(countryCode: string): void; + + /** + * Insert a number, and update the selected flag accordingly. + * Note that by default, if nationalMode is enabled it will try to use + * national formatting. + * @param aNumber number to be set. + */ + setNumber(aNumber: string): void; + + /** + * Set the type of the placeholder number + * @param type Placeholder number type to be set + */ + setPlaceholderNumberType(type: NumberType): void; } -interface JQuery { - intlTelInput: IntlTelInput.Plugin; +export interface IntlTelInputOptions { + /** + * Whether or not to allow the dropdown. If disabled, there is no dropdown + * arrow, and the selected flag is not clickable. Also we display the + * selected flag on the right instead because it is just a marker of state. + * Default = true + */ + allowDropdown?: boolean; + + /** + * If there is just a dial code in the input: remove it on blur or submit, + * and re-add it on focus. This is to prevent just a dial code getting + * submitted with the form. Requires nationalMode to be set to false. + * Default = true + */ + autoHideDialCode?: boolean; + + /** + * Set the input's placeholder to an example number for the selected country, and update it if the country changes. + * You can specify the number type using the placeholderNumberType option. + * By default it is set to "polite", which means it will only set the placeholder if the input doesn't already have one. + * You can also set it to "aggressive", which will replace any existing placeholder, or "off". + * Requires the utilsScript option. + * Default = "polite" + */ + autoPlaceholder?: "off" | "polite" | "aggressive"; + + /** + * Change the placeholder generated by autoPlaceholder. Must return a string. + * Default = null + */ + customPlaceholder?: (selectedCountryPlaceholder: string, selectedCountryData: CountryData) => string; + + /** + * Expects a node e.g. document.body. Instead of putting the country dropdown next to the input, + * append it to the specified node, and it will then be positioned absolutely next to the input using JavaScript. + * This is useful when the input is inside a container with overflow: hidden. + * Note that the absolute positioning can be broken by scrolling, so it will automatically close on the window scroll event. + * Default = null + */ + dropdownContainer?: Node; + + /** + * In the dropdown, display all countries except the ones you specify here. + * Default = null + */ + excludeCountries?: string[]; + + /** + * Format the input value (according to the nationalMode option) during initialisation, and on setNumber. + * Requires the utilsScript option. + * Default = true + */ + formatOnDisplay?: boolean; + + /** + * When setting initialCountry to "auto", you must use this option to + * specify a custom function that looks up the user's location, + * and then calls the success callback with the relevant country code. + * Also note that when instantiating the plugin, if the Promise object is defined, + * one of those is returned under the promise instance property, so you can + * do something like iti.promise.then(callback) to know when initialisation requests like this have completed. + * Default = null + */ + geoIpLookup?: (callback: (countryCode: string) => void) => void; + + /** + * Add a hidden input with the given name (or if your input name contains square brackets then it will give the hidden input the same name, + * replacing the contents of the brackets with the given name). On submit, populate it with the full international number (using getNumber). + * This is a quick way for people using non-ajax forms to get the full international number, even when nationalMode is enabled. + * Note: requires the input to be inside a form element, as this feature works by listening for the submit event on the closest form element. + * Also note that since this uses getNumber internally, it expects a valid number, and so should only be used after validation. + * Default = "" + */ + hiddenInput?: string; + + /** + * Set the initial country selection by specifying it's country code. + * You can also set it to "auto", which will lookup the user's country based + * on their IP address (requires the geoIpLookup option). + * Note that the "auto" option will not update the country selection if the + * input already contains a number. If you leave initialCountry blank, + * it will default to the first country in the list. + */ + initialCountry?: string; + + /** + * Allows to translate the countries by its given iso code e.g.: { 'de': 'Deutschland' } + * Default = {} + */ + localizedCountries?: object; + + /** + * Allow users to enter national numbers (and not have to think about + * international dial codes). Formatting, validation and placeholders still + * work. Then you can use getNumber to extract a full international number. + * This option now defaults to true, and it is recommended that you leave it + * that way as it provides a better experience for the user. + * Default = true + */ + nationalMode?: boolean; + + /** + * In the dropdown, display only the countries you specify. + * Default = undefined + */ + onlyCountries?: string[]; + + /** + * Specify one of the keys from the global enum intlTelInputUtils.numberType + * e.g. "FIXED_LINE" to set the number type to use for the placeholder. + * Default = MOBILE + */ + placeholderNumberType?: NumberType; + + /** + * Specify the countries to appear at the top of the list. + * Default = ["us", "gb"] + */ + preferredCountries?: string[]; + + /** + * Display the country dial code next to the selected flag so it's not part + * of the typed number. Note that this will disable nationalMode because + * technically we are dealing with international numbers, but with the + * dial code separated. + * Default = false + */ + separateDialCode?: boolean; + + /** + * Enable formatting/validation etc. by specifying the URL of the included utils.js script + * (or alternatively just point it to the file on cdnjs.com). The script is fetched when the page has finished loading (on the window load event) + * to prevent blocking (the script is ~215KB). When instantiating the plugin, if the Promise object is defined, + * one of those is returned under the promise instance property, so you can do something like + * iti.promise.then(callback) to know when initialisation requests like this have finished. + * Note that if you're lazy loading the plugin script itself (intlTelInput.js) + * this will not work and you will need to use the loadUtils method instead. + * Example: "build/js/utils.js" + * Default = "" + */ + utilsScript?: string; +} + +export interface CountryData { + name: string; + iso2: string; + dialCode: string; +} + +export enum NumberFormat { + E164 = 0, + INTERNATIONAL = 1, + NATIONAL = 2, + RFC3966 = 3 +} + +export enum NumberType { + FIXED_LINE = 0, + MOBILE = 1, + FIXED_LINE_OR_MOBILE = 2, + TOLL_FREE = 3, + PREMIUM_RATE = 4, + SHARED_COST = 5, + VOIP = 6, + PERSONAL_NUMBER = 7, + PAGER = 8, + UAN = 9, + VOICEMAIL = 10, + UNKNOWN = -1 +} + +export enum ValidationError { + IS_POSSIBLE = 0, + INVALID_COUNTRY_CODE = 1, + TOO_SHORT = 2, + TOO_LONG = 3, + NOT_A_NUMBER = 4 +} + +declare global { + interface Window { + intlTelInput: IntlTelInputStatic; + } } diff --git a/types/intl-tel-input/intl-tel-input-tests.ts b/types/intl-tel-input/intl-tel-input-tests.ts index e91a5deef1..9a84e98428 100644 --- a/types/intl-tel-input/intl-tel-input-tests.ts +++ b/types/intl-tel-input/intl-tel-input-tests.ts @@ -1,70 +1,69 @@ -$('#phone').intlTelInput(); +import IntlTelInput = require("intl-tel-input"); -$('#phone').intlTelInput({ - customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) { +const input = document.querySelector("#phone"); +window.intlTelInput(input); + +window.intlTelInput(input, { + customPlaceholder(selectedCountryPlaceholder, selectedCountryData) { return 'e.g. ' + selectedCountryPlaceholder; } }); -$('#phone').intlTelInput({ - placeholderNumberType: "MOBILE", +window.intlTelInput(input, { + placeholderNumberType: IntlTelInput.NumberType.MOBILE, }); -$('#phone').intlTelInput({ - geoIpLookup: function(callback) { - $.get('http://ipinfo.io', function() {}, 'jsonp').always(function(resp) { - let countryCode = (resp && resp.country) ? resp.country : ''; +window.intlTelInput(input, { + geoIpLookup(callback) { + const countryCode = 'XY'; callback(countryCode); - }); } }); -$('#phone').intlTelInput('destroy'); +window.intlTelInput(input).destroy(); -let extension = $('#phone').intlTelInput('getExtension'); +const extension = window.intlTelInput(input).getExtension(); -let intlNumber = $('#phone').intlTelInput('getNumber'); -let ntlNumber = $('#phone').intlTelInput('getNumber', intlTelInputUtils.numberFormat.NATIONAL); +const intlNumber = window.intlTelInput(input).getNumber(); +const ntlNumber = window.intlTelInput(input).getNumber(IntlTelInput.NumberFormat.NATIONAL); -let numberType = $('#phone').intlTelInput('getNumberType'); -if (numberType === intlTelInputUtils.numberType.MOBILE) {} +const numberType = window.intlTelInput(input).getNumberType(); +if (numberType === IntlTelInput.NumberType.MOBILE) {} -let selectedCountryData = $('#phone').intlTelInput('getSelectedCountryData'); +const selectedCountryData = window.intlTelInput(input).getSelectedCountryData(); -let error = $('#phone').intlTelInput('getValidationError'); -if (error === intlTelInputUtils.validationError.TOO_SHORT) {} +const error = window.intlTelInput(input).getValidationError(); +if (error === IntlTelInput.ValidationError.TOO_SHORT) {} -let isValid = $('#phone').intlTelInput('isValidNumber'); +const isValid = window.intlTelInput(input).isValidNumber(); -$('#phone').intlTelInput('setCountry', 'gb'); +window.intlTelInput(input).setCountry('gb'); -$('#phone').intlTelInput('setNumber', '+447733123456'); +window.intlTelInput(input).setNumber('+447733123456'); -let countryData = $.fn.intlTelInput.getCountryData(); +const countryData = window.intlTelInput.getCountryData(); -$.fn.intlTelInput.loadUtils('build/js/utils.js'); +window.intlTelInput.loadUtils('build/js/utils.js'); -$('#phone').intlTelInput({ +window.intlTelInput(input, { utilsScript: '../../build/js/utils.js' }); -$('#phone').intlTelInput({ +window.intlTelInput(input, { initialCountry: 'auto', - geoIpLookup: function(callback) { - $.get('http://ipinfo.io', function() {}, 'jsonp').always(function(resp) { - let countryCode = (resp && resp.country) ? resp.country : ''; + geoIpLookup: (callback) => { + const countryCode = 'XY'; callback(countryCode); - }); }, utilsScript: '../../build/js/utils.js' }); -$('#phone').intlTelInput({ +window.intlTelInput(input, { nationalMode: true, utilsScript: '../../build/js/utils.js' }); -$('#phone').intlTelInput({ +window.intlTelInput(input, { onlyCountries: ['al'], utilsScript: '../../build/js/utils.js' }); diff --git a/types/intl-tel-input/tslint.json b/types/intl-tel-input/tslint.json index b6afb8acee..f93cf8562a 100644 --- a/types/intl-tel-input/tslint.json +++ b/types/intl-tel-input/tslint.json @@ -1,80 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-const-enum": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "semicolon": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "typedef-whitespace": false, - "unified-signatures": false, - "void-return": false, - "whitespace": false - } + "extends": "dtslint/dt.json" } From 49864f1e5177e3de44fd18ea5157a7a691e5075d Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 17:04:24 +0000 Subject: [PATCH 0158/1121] Address PR feedback from kalley thanks @kalley! :smiley: --- types/slate-react/index.d.ts | 2 +- types/slate/index.d.ts | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index 187bdd0689..140d9f747d 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -95,7 +95,7 @@ export interface BasicEditorProps { autoCorrect?: boolean; autoFocus?: boolean; className?: string; - onChange?: (operations: Immutable.List, value: Value) => any; + onChange?: (change: { operations: Immutable.List, value: Value }) => any; placeholder?: any; plugins?: Plugin[]; readOnly?: boolean; diff --git a/types/slate/index.d.ts b/types/slate/index.d.ts index 7d5eb5ce34..d4d12d376a 100644 --- a/types/slate/index.d.ts +++ b/types/slate/index.d.ts @@ -1048,7 +1048,7 @@ export interface PathUtils { } export interface EditorProperties { - onChange?: (value: Value) => void; + onChange?: (change: { operations: Immutable.List, value: Value }) => void; plugins?: any[]; readOnly?: boolean; value?: Value; @@ -1056,7 +1056,7 @@ export interface EditorProperties { export class Editor { object: "editor"; - onChange: (value: Value) => void; + onChange: (change: { operations: Immutable.List, value: Value }) => void; plugins: any[]; readOnly: boolean; value: Value; @@ -1099,7 +1099,7 @@ export class Editor { * You can optionally provide a normalize option to either for the editor to completely re-normalize the new value based on its schema or not. * By default, the editor will re-normalize only if the value is not equal to its previously seen value (which it knows was normalized). */ - setValue(value: Value, options?: { normalize: () => void }): Editor; + setValue(value: Value, options?: { normalize: boolean }): Editor; // Built in Command Operations // // Current Selection Commands // @@ -1250,7 +1250,7 @@ export class Editor { /** * Move the anchor of the current selection to a new path and offset */ - moveAnchorTo(path: Path, offset: number): Editor; + moveAnchorTo(path: Path, offset?: number): Editor; /** * Move the anchor of the current selection to the end of the closest block parent. */ @@ -1352,7 +1352,7 @@ export class Editor { /** * Move the end of the selection to a new path and offset */ - moveEndTo(path: Path, offset: number): Editor; + moveEndTo(path: Path, offset?: number): Editor; /** * Move the end of the current selection to the end of the closest block parent. */ @@ -1453,7 +1453,7 @@ export class Editor { /** * Move the focus of the current selection to a new path and offset */ - moveFocusTo(path: Path, offset: number): Editor; + moveFocusTo(path: Path, offset?: number): Editor; /** * Move the focus of the current selection to the end of the closest block parent. */ @@ -1655,7 +1655,7 @@ export class Editor { /** * Collapse the current selection at the provided new path and offset. */ - moveTo(path: Path, offset: number): Editor; + moveTo(path: Path, offset?: number): Editor; /** * Collapse the current selection at the anchor. */ @@ -2096,7 +2096,7 @@ export class Editor { * * This allows for sequence change operations to not be interrupted by normalization */ - withoutNormalization(fn: () => void): Editor; + withoutNormalizing(fn: () => void): Editor; /** * By default all operations are saved to the editor's history. If you have * changes that you don't want to show up in history, use this function. From f7bc39e6e9fdbcfb8a89763ed29489bad86afd60 Mon Sep 17 00:00:00 2001 From: Sebastian Greaves Date: Wed, 31 Oct 2018 17:07:03 +0000 Subject: [PATCH 0159/1121] update tests --- types/slate-react/slate-react-tests.tsx | 4 ++-- types/slate/slate-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/slate-react/slate-react-tests.tsx b/types/slate-react/slate-react-tests.tsx index 64f1256668..76ecb5c579 100644 --- a/types/slate-react/slate-react-tests.tsx +++ b/types/slate-react/slate-react-tests.tsx @@ -19,8 +19,8 @@ class MyPlugin implements Plugin { } } } - onChange = (operations: Immutable.List, value: Value) => { - console.log(value); + onChange = (change: {operations: Immutable.List, value: Value}) => { + console.log(change.value); } } diff --git a/types/slate/slate-tests.ts b/types/slate/slate-tests.ts index 0d6f2331e5..98c0758c21 100644 --- a/types/slate/slate-tests.ts +++ b/types/slate/slate-tests.ts @@ -265,7 +265,7 @@ editor .unwrapNodeByKey("a") .unwrapNodeByPath("a") .withoutMerging(() => { /* noop */ }) -.withoutNormalization(() => { /* noop */ }) +.withoutNormalizing(() => { /* noop */ }) .withoutSaving(() => { /* noop */ }) .wrapBlock("paragraph") .wrapBlockAtRange(range, "paragraph") From 2d429c4da87ea91c58902ee06ee217dfa3effd40 Mon Sep 17 00:00:00 2001 From: Arne Schubert Date: Wed, 31 Oct 2018 18:51:22 +0100 Subject: [PATCH 0160/1121] #15313: TileLayerOptions should not be a dictionary to make it checkable --- types/leaflet/index.d.ts | 6 +++++- types/leaflet/leaflet-tests.ts | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/types/leaflet/index.d.ts b/types/leaflet/index.d.ts index 8402d8bc9b..c9f960b3e6 100644 --- a/types/leaflet/index.d.ts +++ b/types/leaflet/index.d.ts @@ -494,7 +494,11 @@ export interface TileLayerOptions extends GridLayerOptions { zoomReverse?: boolean; detectRetina?: boolean; crossOrigin?: boolean; - [name: string]: any; + // [name: string]: any; + // You are able add additional properties, but it makes this interface unchackable. + // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/15313 + // Example: + // tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}&{bar}&{abc}', {foo: 'bar', bar: (data: any) => 'foo', abc: () => ''}); } export class TileLayer extends GridLayer { diff --git a/types/leaflet/leaflet-tests.ts b/types/leaflet/leaflet-tests.ts index d1375fa83f..87779c6de7 100644 --- a/types/leaflet/leaflet-tests.ts +++ b/types/leaflet/leaflet-tests.ts @@ -227,9 +227,6 @@ tileLayerOptions = { pane: '', className: '', keepBuffer: 1, - foo: 'bar', - bar: () => 'foo', - abc: (data: any) => 'foobar' }; tileLayerOptions.subdomains = 'a'; @@ -245,11 +242,9 @@ tileLayerOptions.bounds = latLngBoundsLiteral; let tileLayer: L.TileLayer; tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png'); tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', tileLayerOptions); -tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}&{bar}&{abc}', {foo: 'bar', bar: (data: any) => 'foo', abc: () => ''}); tileLayer = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png'); tileLayer = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', tileLayerOptions); -tileLayer = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}&{bar}&{abc}', {foo: 'bar', bar: (data: any) => 'foo', abc: () => ''}); // imageOverlay let imageOverlayOptions: L.ImageOverlayOptions; From cac181f076b8b21962c8df063f0178cf4094d6ef Mon Sep 17 00:00:00 2001 From: Arne Schubert Date: Wed, 31 Oct 2018 19:01:56 +0100 Subject: [PATCH 0161/1121] #9257: Add the possibility to set styles in GeoJSONOptions via style-function and PathOptions --- types/leaflet/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/leaflet/index.d.ts b/types/leaflet/index.d.ts index 8402d8bc9b..c6b97e3b28 100644 --- a/types/leaflet/index.d.ts +++ b/types/leaflet/index.d.ts @@ -817,7 +817,7 @@ export interface GeoJSONOptions

extends LayerOptions { pointToLayer?(geoJsonPoint: geojson.Feature, latlng: LatLng): Layer; // should import GeoJSON typings /** - * A Function defining the Path options for styling GeoJSON lines and polygons, + * PathOptions or a Function defining the Path options for styling GeoJSON lines and polygons, * called internally when data is added. * * The default value is to not override any defaults: @@ -828,7 +828,7 @@ export interface GeoJSONOptions

extends LayerOptions { * } * ``` */ - style?: StyleFunction

; + style?: PathOptions | StyleFunction

; /** * A Function that will be called once for each created Feature, after it From facb4b182903effb94da4626d74f923ddcdc6194 Mon Sep 17 00:00:00 2001 From: licui Date: Wed, 31 Oct 2018 15:48:43 -0400 Subject: [PATCH 0162/1121] Update external process shapes from v1 to v2 --- .../_v2/api/system/external-process.d.ts | 20 ++++- types/openfin/_v2/api/system/system.d.ts | 6 +- types/openfin/index.d.ts | 77 +------------------ 3 files changed, 22 insertions(+), 81 deletions(-) diff --git a/types/openfin/_v2/api/system/external-process.d.ts b/types/openfin/_v2/api/system/external-process.d.ts index 8a68f1eae3..624c93ea18 100644 --- a/types/openfin/_v2/api/system/external-process.d.ts +++ b/types/openfin/_v2/api/system/external-process.d.ts @@ -1,7 +1,17 @@ export interface ExternalProcessRequestType { - path: string; - arguments: string; - listener: LaunchExternalProcessListener; + path?: string; + alias?: string; + arguments?: string; + listener?: LaunchExternalProcessListener; + lifetime?: string; + certificate?: CertificationInfo; +} +export interface CertificationInfo { + serial?: string; + subject?: string; + publickey?: string; + thumbprint?: string; + trusted?: boolean; } export interface ExitCode { topic: string; @@ -20,3 +30,7 @@ export interface ExternalConnection { token: string; uuid: string; } +export interface ExternalProcessInfo { + pid: number; + listener?: LaunchExternalProcessListener; +} diff --git a/types/openfin/_v2/api/system/system.d.ts b/types/openfin/_v2/api/system/system.d.ts index 88a37d0b26..76f244cabf 100644 --- a/types/openfin/_v2/api/system/system.d.ts +++ b/types/openfin/_v2/api/system/system.d.ts @@ -12,7 +12,7 @@ import { RVMInfo } from './rvm'; import { RuntimeInfo } from './runtime-info'; import { Entity, EntityInfo } from './entity'; import { HostSpecs } from './host-specs'; -import { ExternalProcessRequestType, TerminateExternalRequestType, ExternalConnection } from './external-process'; +import { ExternalProcessRequestType, TerminateExternalRequestType, ExternalConnection, ExternalProcessInfo } from './external-process'; import Transport from '../../transport/transport'; import { CookieInfo, CookieOption } from './cookie'; import { RegistryInfo } from './registry-info'; @@ -454,11 +454,11 @@ export default class System extends EmitterBase { launchExternalProcess(options: ExternalProcessRequestType): Promise; /** * Monitors a running process. - * @param { number } pid See tutorial for more details + * @param { ExternalProcessInfo } options See tutorial for more details * @return {Promise.} * @tutorial System.monitorExternalProcess */ - monitorExternalProcess(pid: number): Promise; + monitorExternalProcess(options: ExternalProcessInfo): Promise; /** * Writes the passed message into both the log file and the console. * @param { string } level The log level for the entry. Can be either "info", "warning" or "error" diff --git a/types/openfin/index.d.ts b/types/openfin/index.d.ts index b77b91eba5..41e35c0c45 100644 --- a/types/openfin/index.d.ts +++ b/types/openfin/index.d.ts @@ -34,6 +34,7 @@ import { CookieInfo, CookieOption } from './_v2/api/system/cookie'; import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './_v2/api/system/download-asset'; import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/download-preload'; import { EntityInfo } from './_v2/api/system/entity'; +import { ExternalProcessRequestType, ExternalProcessInfo } from './_v2/api/system/external-process'; import { HostSpecs } from './_v2/api/system/host-specs'; import { LogInfo } from './_v2/api/system/log'; import { MonitorInfo } from './_v2/api/system/monitor'; @@ -584,7 +585,7 @@ declare namespace fin { /** * Runs an executable or batch file. */ - launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; + launchExternalProcess(options: ExternalProcessRequestType, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void; /** * Writes the passed message into both the log file and the console. */ @@ -657,80 +658,6 @@ declare namespace fin { updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void; } - interface ExternalProcessLaunchInfo { - path?: string; - /** - * Additionally note that the executable found in the zip file specified in appAssets - * will default to the one mentioned by appAssets.target - * If the the path below refers to a specific path it will override this default - */ - alias?: string; - /** - * When using alias; if no arguments are passed then the arguments (if any) - * are taken from the 'app.json' file, from the 'args' parameter - * of the 'appAssets' Object with the relevant 'alias'. - * If 'arguments' is passed as a parameter it takes precedence - * over any 'args' set in the 'app.json'. - */ - arguments?: string; - listener?(result: { - /** - * "Exited" Or "released" on a call to releaseExternalProcess - */ - topic?: string; - /** - * The mapped UUID which identifies the launched process - */ - uuid?: string; - /* - * Process exit code - */ - exitCode?: number; - }): void; - certificate?: CertificationInfo; - } - - interface CertificationInfo { - /** - * A hex string with or without spaces - */ - serial?: string; - /** - * An internally tokenized and comma delimited string allowing partial or full checks of the subject fields - */ - subject?: string; - /** - * A hex string with or without spaces - */ - publickey?: string; - /** - * A hex string with or without spaces - */ - thumbprint?: string; - /** - * A boolean indicating that the certificate is trusted and not revoked - */ - trusted?: boolean; - } - - interface ExternalProcessInfo { - pid?: number; - listener?(result: { - /** - * "Exited" Or "released" on a call to releaseExternalProcess - */ - topic?: string; - /** - * The mapped UUID which identifies the launched process - */ - uuid?: string; - /* - * Process exit code - */ - exitCode?: number; - }): void; - } - interface OpenFinWindowStatic { /** * Class: Window From 3e4f4a77e5277c91d7af634e3becac359ebe078c Mon Sep 17 00:00:00 2001 From: Arjan Jassal Date: Wed, 31 Oct 2018 14:21:18 -0700 Subject: [PATCH 0163/1121] add types for styled-theming --- types/styled-theming/index.d.ts | 33 ++++++++++++++++++++ types/styled-theming/styled-theming-tests.ts | 13 ++++++++ types/styled-theming/tsconfig.json | 22 +++++++++++++ types/styled-theming/tslint.json | 1 + 4 files changed, 69 insertions(+) create mode 100644 types/styled-theming/index.d.ts create mode 100644 types/styled-theming/styled-theming-tests.ts create mode 100644 types/styled-theming/tsconfig.json create mode 100644 types/styled-theming/tslint.json diff --git a/types/styled-theming/index.d.ts b/types/styled-theming/index.d.ts new file mode 100644 index 0000000000..235666cf16 --- /dev/null +++ b/types/styled-theming/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for styled-theming 2.2 +// Project: https://github.com/styled-components/styled-theming#readme +// Definitions by: Arjan Jassal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 3.1.1 + +declare module "styled-theming" { + type ThemeValueFn = (props: object) => string; + type ThemeValue = string | ThemeValueFn; + + interface ThemeMap { + [key: string]: ThemeValue; + } + + interface VariantMap { + [key: string]: ThemeMap; + } + + type ThemeSet = (props: object) => string; + type VariantSet = (props: object) => string; + + namespace theme { + export function variants( + name: string, + prop: string, + values: VariantMap + ): VariantSet; + } + + function theme(name: string, values: ThemeMap): ThemeSet; + + export = theme; +} diff --git a/types/styled-theming/styled-theming-tests.ts b/types/styled-theming/styled-theming-tests.ts new file mode 100644 index 0000000000..a4b1caa60d --- /dev/null +++ b/types/styled-theming/styled-theming-tests.ts @@ -0,0 +1,13 @@ +import * as theme from "styled-theming"; + +const textColor = theme("mode", { + dark: "white", + light: "black" +}); + +const backgroundColor = theme.variants("mode", "variant", { + default: { light: "gray", dark: "darkgray" }, + primary: { light: "blue", dark: "darkblue" }, + success: { light: "green", dark: "darkgreen" }, + warning: { light: "orange", dark: "darkorange" } +}); diff --git a/types/styled-theming/tsconfig.json b/types/styled-theming/tsconfig.json new file mode 100644 index 0000000000..b94e3593fc --- /dev/null +++ b/types/styled-theming/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "styled-theming-tests.ts" + ] +} diff --git a/types/styled-theming/tslint.json b/types/styled-theming/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/styled-theming/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From edabd802ee9e2a8da785ab15263761ed249cdb4e Mon Sep 17 00:00:00 2001 From: Francesco Agnoletto Date: Thu, 1 Nov 2018 00:23:24 +0100 Subject: [PATCH 0164/1121] Fix RenderNodeProps to only accept Block | Inline as node https://github.com/ianstormtaylor/slate/blob/8dd919dc3457c62ea2aa72f31b83faf42cbaba72/packages/slate-react/src/plugins/react.js#L73 --- types/slate-react/index.d.ts | 5 +++-- types/slate-react/slate-react-tests.tsx | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index c79b945a5b..48dc0db0be 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -5,9 +5,10 @@ // Jan Löbel // Patrick Sachs // Brandon Shelton +// Francesco Agnoletto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Mark, Node, Block, Change, Schema, Value, Stack } from 'slate'; +import { Mark, Node, Block, Inline, Change, Schema, Value, Stack } from 'slate'; import * as Immutable from 'immutable'; import * as React from 'react'; @@ -33,7 +34,7 @@ export interface RenderNodeProps { editor: Editor; isSelected: boolean; key: string; - node: Node; + node: Block | Inline; parent: Node; } diff --git a/types/slate-react/slate-react-tests.tsx b/types/slate-react/slate-react-tests.tsx index d8c8ea0073..4b6e6429c0 100644 --- a/types/slate-react/slate-react-tests.tsx +++ b/types/slate-react/slate-react-tests.tsx @@ -11,8 +11,6 @@ class MyPlugin implements Plugin { return

; case "inline": return Hello world; - case "text": - return

Hello world

; default: return undefined; } From 7496851d07cd76b20f8fba4e612b31364fb606d6 Mon Sep 17 00:00:00 2001 From: Francesco Agnoletto Date: Thu, 1 Nov 2018 00:39:55 +0100 Subject: [PATCH 0165/1121] Switch back single tick for double --- types/slate-react/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index 5fe7ae15bd..7fad370ba4 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -9,9 +9,9 @@ // Francesco Agnoletto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Mark, Node, Block, Inline, Change, Schema, Value, Stack, Document } from 'slate'; -import * as Immutable from 'immutable'; -import * as React from 'react'; +import { Mark, Node, Block, Inline, Change, Schema, Value, Stack, Document } from "slate"; +import * as Immutable from "immutable"; +import * as React from "react"; // Values prefixed with "data-..." (Used for spellchecking according to docs) export interface RenderAttributes { From 787ac3cc6662ee26e48407f771e2253b60b3b4b4 Mon Sep 17 00:00:00 2001 From: Arjan Jassal Date: Wed, 31 Oct 2018 20:39:08 -0700 Subject: [PATCH 0166/1121] refactor and fix linting --- types/styled-theming/index.d.ts | 24 +++++++++----------- types/styled-theming/styled-theming-tests.ts | 2 +- types/styled-theming/tsconfig.json | 14 ++++-------- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/types/styled-theming/index.d.ts b/types/styled-theming/index.d.ts index 235666cf16..227fb5aba1 100644 --- a/types/styled-theming/index.d.ts +++ b/types/styled-theming/index.d.ts @@ -2,9 +2,11 @@ // Project: https://github.com/styled-components/styled-theming#readme // Definitions by: Arjan Jassal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.1.1 +// TypeScript Version: 2.2 -declare module "styled-theming" { +declare function theme(name: string, values: theme.ThemeMap): theme.ThemeSet; + +declare namespace theme { type ThemeValueFn = (props: object) => string; type ThemeValue = string | ThemeValueFn; @@ -19,15 +21,11 @@ declare module "styled-theming" { type ThemeSet = (props: object) => string; type VariantSet = (props: object) => string; - namespace theme { - export function variants( - name: string, - prop: string, - values: VariantMap - ): VariantSet; - } - - function theme(name: string, values: ThemeMap): ThemeSet; - - export = theme; + function variants( + name: string, + prop: string, + values: VariantMap + ): VariantSet; } + +export default theme; diff --git a/types/styled-theming/styled-theming-tests.ts b/types/styled-theming/styled-theming-tests.ts index a4b1caa60d..2d9e947009 100644 --- a/types/styled-theming/styled-theming-tests.ts +++ b/types/styled-theming/styled-theming-tests.ts @@ -1,4 +1,4 @@ -import * as theme from "styled-theming"; +import theme from "styled-theming"; const textColor = theme("mode", { dark: "white", diff --git a/types/styled-theming/tsconfig.json b/types/styled-theming/tsconfig.json index b94e3593fc..790a9ddd81 100644 --- a/types/styled-theming/tsconfig.json +++ b/types/styled-theming/tsconfig.json @@ -1,22 +1,16 @@ { "compilerOptions": { "module": "commonjs", - "lib": [ - "es6" - ], + "lib": ["es6"], "noImplicitAny": true, "noImplicitThis": true, + "strictFunctionTypes": true, "strictNullChecks": true, "baseUrl": "../", - "typeRoots": [ - "../" - ], + "typeRoots": ["../"], "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": [ - "index.d.ts", - "styled-theming-tests.ts" - ] + "files": ["index.d.ts", "styled-theming-tests.ts"] } From 0849e5e41a0b9f105ff7010e25a52cabfb14cfac Mon Sep 17 00:00:00 2001 From: Viktor Pegij Date: Thu, 1 Nov 2018 10:14:58 +0300 Subject: [PATCH 0167/1121] [CKEditor] Add more skin settings --- types/ckeditor/ckeditor-tests.ts | 3 +++ types/ckeditor/index.d.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/types/ckeditor/ckeditor-tests.ts b/types/ckeditor/ckeditor-tests.ts index a6f9c9cf5c..6a0b50a4d8 100644 --- a/types/ckeditor/ckeditor-tests.ts +++ b/types/ckeditor/ckeditor-tests.ts @@ -914,6 +914,9 @@ function test_skin() { CKEDITOR.skin.loadPart('part', () => console.log('load')); var path2: string = CKEDITOR.skin.path(); + + CKEDITOR.skin.ua_dialog = 'ie,iequirks,ie8,gecko'; + CKEDITOR.skin.ua_editor = 'ie,gecko'; } function test_style() { diff --git a/types/ckeditor/index.d.ts b/types/ckeditor/index.d.ts index 6815d3aa98..69c23d6a99 100644 --- a/types/ckeditor/index.d.ts +++ b/types/ckeditor/index.d.ts @@ -2,6 +2,7 @@ // Project: https://ckeditor.com/ckeditor-4/ // Definitions by: Thomas Wittwer // Stuart Long +// Viktor Pegy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // WORK-IN-PROGRESS: Any contribution support welcomed. @@ -2168,6 +2169,8 @@ declare namespace CKEDITOR { // tslint:disable-next-line:no-duplicate-variable var name: string; var ua: { [name: string]: any }; + var ua_dialog: string; + var ua_editor: string; function addIcon(name: string, path: string, offset?: number, bgsize?: string): void; function chameleon(editor: string, part: string): void; From aa8090af05e8d2b6fc99a2449e6ae4687df6808c Mon Sep 17 00:00:00 2001 From: Omar Diab Date: Thu, 31 May 2018 14:43:00 -0400 Subject: [PATCH 0168/1121] uncomment tests that failed in versions prior to tsc 2.9 --- types/react-mailchimp-subscribe/index.d.ts | 2 +- .../react-mailchimp-subscribe-tests.tsx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/types/react-mailchimp-subscribe/index.d.ts b/types/react-mailchimp-subscribe/index.d.ts index 55b5c487ed..ed0165ed00 100644 --- a/types/react-mailchimp-subscribe/index.d.ts +++ b/types/react-mailchimp-subscribe/index.d.ts @@ -2,7 +2,7 @@ // Project: https://revolunet.github.io/react-mailchimp-subscribe/ // Definitions by: Omar Diab // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 import { Component, ReactNode } from "react"; diff --git a/types/react-mailchimp-subscribe/react-mailchimp-subscribe-tests.tsx b/types/react-mailchimp-subscribe/react-mailchimp-subscribe-tests.tsx index 0507d7657a..d09ef6cc9a 100644 --- a/types/react-mailchimp-subscribe/react-mailchimp-subscribe-tests.tsx +++ b/types/react-mailchimp-subscribe/react-mailchimp-subscribe-tests.tsx @@ -25,9 +25,7 @@ const Example: React.StatelessComponent = () => ( )} url="spam.biz/subscribe" /> - { /* once Typescript 2.9 is out, generics in components will be allowed, at that point uncomment these. */ } - { /* https://github.com/Microsoft/TypeScript/pull/22415 */ } - {/* + render={(hooks) => (
{ @@ -52,6 +50,6 @@ const Example: React.StatelessComponent = () => ( /> )} url="spam.biz/subscribe" - /> */} + /> ); From 1b14cabe4aaf957f19b05e0f9fe32f1877e52b1e Mon Sep 17 00:00:00 2001 From: chrolivier Date: Thu, 1 Nov 2018 11:02:11 +0200 Subject: [PATCH 0169/1121] Added TypeScript definitions for queue operations --- types/arangodb/index.d.ts | 71 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/types/arangodb/index.d.ts b/types/arangodb/index.d.ts index 5babc4a961..8f54268e19 100644 --- a/types/arangodb/index.d.ts +++ b/types/arangodb/index.d.ts @@ -1440,6 +1440,77 @@ declare module "@arangodb/foxx/router" { export = createRouter; } +declare module "@arangodb/foxx/queues" { + interface QueueItem { + name: string; + mount: string; + backOff: ((failureCount: number) => number) | number | undefined; + maxFailures: number | undefined; + schema: Foxx.Schema | undefined; + preprocess: ((data: any) => any) | undefined; + } + + interface Script { + name: string; + mount: string; + } + + // TODO: flesh this out + type JobCallback = (result: any, jobData: any, job: ArangoDB.Document) => void; + + interface Job { + status: string; + queue: string; + type: Script; + failures: object[]; + runs: number; + data: any; + created: number; + modified: number; + delayUntil: number; + maxFailures: number; + repeatDelay: number; + repeatTimes: number; + repeatUntil: number; + success: string | undefined; + failure: string | undefined; + runFailures: number; + abort(): void; + } + + interface JobOptions { + success: JobCallback | undefined; + failure: JobCallback | undefined; + delayUntil: number | Date | undefined; + backOff: ((failureCount: number) => number) | number | undefined; + maxFailures: number | undefined; + repeatTimes: number | undefined; + repeatUntil: number | Date | undefined; + repeatDelay: number | undefined; + } + + interface Queue { + push(item: QueueItem, data: any): void; + get(jobId: string): ArangoDB.Document; + delete(jobId: string): boolean; + pending(script: Script | undefined): string[]; + progress(script: Script | undefined): string[]; + complete(script: Script | undefined): string[]; + failed(script: Script | undefined): string[]; + all(script: Script | undefined): string[]; + } + + function createQueue(name: string, maxWorkers?: number): Queue; + function deleteQueue(name: string): boolean; + function get(name: string): Queue; + + export { + createQueue as create, + deleteQueue as delete, + get, + }; +} + declare module "@arangodb/foxx/graphql" { import { formatError, GraphQLSchema } from "graphql"; type GraphQLModule = object; From 85b7547a3eb599aa2190cda7d382eeaabf27bc45 Mon Sep 17 00:00:00 2001 From: chrolivier Date: Thu, 1 Nov 2018 12:37:27 +0200 Subject: [PATCH 0170/1121] function signature fixes --- types/arangodb/index.d.ts | 46 +++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/types/arangodb/index.d.ts b/types/arangodb/index.d.ts index 8f54268e19..238cea2379 100644 --- a/types/arangodb/index.d.ts +++ b/types/arangodb/index.d.ts @@ -1444,10 +1444,10 @@ declare module "@arangodb/foxx/queues" { interface QueueItem { name: string; mount: string; - backOff: ((failureCount: number) => number) | number | undefined; - maxFailures: number | undefined; - schema: Foxx.Schema | undefined; - preprocess: ((data: any) => any) | undefined; + backOff?: ((failureCount: number) => number) | number; + maxFailures?: number; + schema?: Foxx.Schema; + preprocess?: (data: any) => any; } interface Script { @@ -1455,7 +1455,6 @@ declare module "@arangodb/foxx/queues" { mount: string; } - // TODO: flesh this out type JobCallback = (result: any, jobData: any, job: ArangoDB.Document) => void; interface Job { @@ -1472,32 +1471,32 @@ declare module "@arangodb/foxx/queues" { repeatDelay: number; repeatTimes: number; repeatUntil: number; - success: string | undefined; - failure: string | undefined; + success?: string; + failure?: string; runFailures: number; abort(): void; } interface JobOptions { - success: JobCallback | undefined; - failure: JobCallback | undefined; - delayUntil: number | Date | undefined; - backOff: ((failureCount: number) => number) | number | undefined; - maxFailures: number | undefined; - repeatTimes: number | undefined; - repeatUntil: number | Date | undefined; - repeatDelay: number | undefined; + success?: JobCallback; + failure?: JobCallback; + delayUntil?: number | Date; + backOff?: ((failureCount: number) => number) | number; + maxFailures?: number; + repeatTimes?: number; + repeatUntil?: number | Date; + repeatDelay?: number; } interface Queue { - push(item: QueueItem, data: any): void; + push(item: QueueItem, data: any, opts?: JobOptions): void; get(jobId: string): ArangoDB.Document; delete(jobId: string): boolean; - pending(script: Script | undefined): string[]; - progress(script: Script | undefined): string[]; - complete(script: Script | undefined): string[]; - failed(script: Script | undefined): string[]; - all(script: Script | undefined): string[]; + pending(script?: Script): string[]; + progress(script?: Script): string[]; + complete(script?: Script): string[]; + failed(script?: Script): string[]; + all(script?: Script): string[]; } function createQueue(name: string, maxWorkers?: number): Queue; @@ -1508,6 +1507,11 @@ declare module "@arangodb/foxx/queues" { createQueue as create, deleteQueue as delete, get, + JobOptions, + Job, + Queue, + QueueItem, + Script, }; } From bf99256c235788233a79ad5ce07d956c9699a290 Mon Sep 17 00:00:00 2001 From: Frithjof Winkelmann Date: Thu, 1 Nov 2018 01:23:29 +0100 Subject: [PATCH 0171/1121] Add types for rc-time-picker --- types/rc-time-picker/index.d.ts | 54 +++++++++++++++++++ types/rc-time-picker/rc-time-picker-tests.tsx | 10 ++++ types/rc-time-picker/tsconfig.json | 24 +++++++++ types/rc-time-picker/tslint.json | 1 + 4 files changed, 89 insertions(+) create mode 100644 types/rc-time-picker/index.d.ts create mode 100644 types/rc-time-picker/rc-time-picker-tests.tsx create mode 100644 types/rc-time-picker/tsconfig.json create mode 100644 types/rc-time-picker/tslint.json diff --git a/types/rc-time-picker/index.d.ts b/types/rc-time-picker/index.d.ts new file mode 100644 index 0000000000..354189cc3b --- /dev/null +++ b/types/rc-time-picker/index.d.ts @@ -0,0 +1,54 @@ +// Type definitions for rc-time-picker 3.4 +// Project: http://github.com/react-component/time-picker +// Definitions by: Frithjof Winkelmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as moment from "moment"; +import * as React from 'react'; + +export {}; + +interface TimePickerProps { + prefixCls: string; + clearText: string; + disabled: boolean; + allowEmpty: boolean; + open: boolean; + defaultValue: moment.Moment; + defaultOpenValue: moment.Moment; + value: moment.Moment; + placeholder: string; + className: string; + id: string; + popupClassName: string; + showHour: boolean; + showMinute: boolean; + showSecond: boolean; + format: string; + disabledHours: () => number[]; + disabledMinutes: (hour: number) => number[]; + disabledSeconds: (hour: number, minute: number) => number[]; + use12Hours: boolean; + hideDisabledOptions: boolean; + onChange: (value: moment.Moment) => void; + addon: (timepicker: TimePicker) => void; + placement: string; + transitionName: string; + onOpen: (state: { open: boolean }) => void; + onClose: (state: { open: boolean }) => void; + hourStep: number; + minuteStep: number; + secondStep: number; + focusOnOpen: boolean; + inputReadOnly: boolean; + inputIcon: React.ReactNode; + clearIcon: React.ReactNode; +} + +export default class TimePicker extends React.Component> { + constructor(props: Readonly>) + + close(): void; + isAM(): boolean; +} diff --git a/types/rc-time-picker/rc-time-picker-tests.tsx b/types/rc-time-picker/rc-time-picker-tests.tsx new file mode 100644 index 0000000000..9717e21038 --- /dev/null +++ b/types/rc-time-picker/rc-time-picker-tests.tsx @@ -0,0 +1,10 @@ +import TimePicker from 'rc-time-picker'; +import * as React from 'react'; +import * as moment from 'moment'; + + {}} + placeholder={'Input time'} + showSecond={false} + onOpen={({open}: { open: boolean }) => {}}/>; diff --git a/types/rc-time-picker/tsconfig.json b/types/rc-time-picker/tsconfig.json new file mode 100644 index 0000000000..013c1bfcb5 --- /dev/null +++ b/types/rc-time-picker/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "rc-time-picker-tests.tsx" + ] +} diff --git a/types/rc-time-picker/tslint.json b/types/rc-time-picker/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rc-time-picker/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ae1d344fdf249a4a18ddfd170d62480460f42040 Mon Sep 17 00:00:00 2001 From: Frithjof Winkelmann Date: Thu, 1 Nov 2018 14:12:34 +0100 Subject: [PATCH 0172/1121] Update type of addon in rc-time-picker --- types/rc-time-picker/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/rc-time-picker/index.d.ts b/types/rc-time-picker/index.d.ts index 354189cc3b..79d3f2b89a 100644 --- a/types/rc-time-picker/index.d.ts +++ b/types/rc-time-picker/index.d.ts @@ -32,7 +32,7 @@ interface TimePickerProps { use12Hours: boolean; hideDisabledOptions: boolean; onChange: (value: moment.Moment) => void; - addon: (timepicker: TimePicker) => void; + addon: (timepicker: TimePicker) => JSX.Element; placement: string; transitionName: string; onOpen: (state: { open: boolean }) => void; From 0d341f372340b3137d7a1a2a8c751cab98ae7d9e Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 11:17:30 -0300 Subject: [PATCH 0173/1121] Updated ANSI typings. --- types/ansi/index.d.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index 2b11acc7a3..cd1181b5d9 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -23,6 +23,9 @@ declare function ansi(stream: Stream, options?: CursorOptions): ansi.Cursor; declare namespace ansi { class Cursor { + bg: Colorer; + fg: Colorer; + constructor(stream: Stream, options?: CursorOptions); /** @@ -165,9 +168,11 @@ declare namespace ansi { brightWhite(): Cursor; } - interface Cursor { - [key: string]: (...anything: any[]) => Cursor; - } + /* Removed index signatures due to conflicts. Now you have to + * add them in consumer code: + * + * <{ [key: string]: (..._: any[]) => Cursor }> myCursorOrColorer; + */ } export = ansi; From c1ec00f135d06eae439b3de127408be6dec04770 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 11:32:15 -0300 Subject: [PATCH 0174/1121] Fixed ANSI typings. --- types/ansi/ansi-tests.ts | 2 +- types/ansi/index.d.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index 5d8e73e8ec..09d003a563 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -20,5 +20,5 @@ Object.keys({ , brightCyan: 96 , brightWhite: 97 }).forEach((color) => { - cursor[color]().bold().write(`Hello, bold ${color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`)} world!\n`).reset(); + (<{ [key: string]: (..._: any[]) => ansi.Cursor }> cursor)[color]().bold().write(`Hello, bold ${color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`)} world!\n`).reset(); }); diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index cd1181b5d9..e050aa7c22 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -168,11 +168,13 @@ declare namespace ansi { brightWhite(): Cursor; } - /* Removed index signatures due to conflicts. Now you have to - * add them in consumer code: - * - * <{ [key: string]: (..._: any[]) => Cursor }> myCursorOrColorer; - */ + interface Cursor { + [key: string]: ((...anything: any[]) => Cursor) | Colorer; + } + + interface Colorer { + [key: string]: (...anything: any[]) => (Cursor | Colorer); + } } export = ansi; From f6b9c19c45013ff4edff3711686a23532827cf6b Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 11:40:51 -0300 Subject: [PATCH 0175/1121] Fixed test file line lengths. --- types/ansi/ansi-tests.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index 09d003a563..eda120452d 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -20,5 +20,12 @@ Object.keys({ , brightCyan: 96 , brightWhite: 97 }).forEach((color) => { - (<{ [key: string]: (..._: any[]) => ansi.Cursor }> cursor)[color]().bold().write(`Hello, bold ${color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`)} world!\n`).reset(); + let cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); + + (<(...anything: any[]) => ansi.Cursor> cursor[color])() + .bold() + .write( + `Hello, bold ${cname} world!\n` + ) + .reset(); }); From 8235eb4474dc2738bfa7f03c9133d5def7f6d8c2 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 11:44:29 -0300 Subject: [PATCH 0176/1121] Using const... --- types/ansi/ansi-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index eda120452d..cc11ec455e 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -20,7 +20,7 @@ Object.keys({ , brightCyan: 96 , brightWhite: 97 }).forEach((color) => { - let cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); + const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); (<(...anything: any[]) => ansi.Cursor> cursor[color])() .bold() From c4c7627ef809c74ec3aaa9897d165b7f281ac7f3 Mon Sep 17 00:00:00 2001 From: licui Date: Thu, 1 Nov 2018 11:00:55 -0400 Subject: [PATCH 0177/1121] Add path mapping rule --- types/openfin/v34/tsconfig.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/openfin/v34/tsconfig.json b/types/openfin/v34/tsconfig.json index 2a2c9d108b..a304909393 100644 --- a/types/openfin/v34/tsconfig.json +++ b/types/openfin/v34/tsconfig.json @@ -14,6 +14,11 @@ "../" ], "types": [], + "paths": { + "openfin": [ + "openfin/v34" + ] + }, "noEmit": true, "forceConsistentCasingInFileNames": true }, From 51f918e8c977427cf55ebcac66c68edec4813bad Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 12:03:11 -0300 Subject: [PATCH 0178/1121] =?UTF-8?q?Added=20background=20coloring=20to=20?= =?UTF-8?q?test=20=C2=AF\=5F(=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/ansi/ansi-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index cc11ec455e..dc6ec1f0da 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -22,8 +22,9 @@ Object.keys({ }).forEach((color) => { const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); - (<(...anything: any[]) => ansi.Cursor> cursor[color])() + (((<(...anything: any[]) => ansi.Cursor> cursor[color])() .bold() + .bg as ansi.Colorer)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() as ansi.Cursor) .write( `Hello, bold ${cname} world!\n` ) From 634df0175347b702f369f5e21a5ab1b945c5ee31 Mon Sep 17 00:00:00 2001 From: licui Date: Thu, 1 Nov 2018 11:09:15 -0400 Subject: [PATCH 0179/1121] Add missing files and change baseUrl --- types/openfin/tsconfig.json | 3 +++ types/openfin/v34/tsconfig.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/openfin/tsconfig.json b/types/openfin/tsconfig.json index 2a2c9d108b..a7f3e48849 100644 --- a/types/openfin/tsconfig.json +++ b/types/openfin/tsconfig.json @@ -21,6 +21,7 @@ "index.d.ts", "openfin-tests.ts", "_v2/api/application/application.d.ts", + "_v2/api/application/applicationOption.d.ts", "_v2/api/base.d.ts", "_v2/api/clipboard/clipboard.d.ts", "_v2/api/clipboard/write-request.d.ts", @@ -53,10 +54,12 @@ "_v2/api/system/rvm.d.ts", "_v2/api/system/system.d.ts", "_v2/api/system/window.d.ts", + "_v2/api/window/anchor-type.d.ts", "_v2/api/window/bounds-changed.d.ts", "_v2/api/window/bounds.d.ts", "_v2/api/window/transition.d.ts", "_v2/api/window/window.d.ts", + "_v2/api/window/windowOption.d.ts", "_v2/environment/environment.d.ts", "_v2/environment/node-env.d.ts", "_v2/environment/openfin-env.d.ts", diff --git a/types/openfin/v34/tsconfig.json b/types/openfin/v34/tsconfig.json index a304909393..c446671530 100644 --- a/types/openfin/v34/tsconfig.json +++ b/types/openfin/v34/tsconfig.json @@ -9,9 +9,9 @@ "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": true, - "baseUrl": "../", + "baseUrl": "../../", "typeRoots": [ - "../" + "../../" ], "types": [], "paths": { From f09c1b738272f418c2e7b016ef4c497ee618df20 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 12:10:26 -0300 Subject: [PATCH 0180/1121] Fixed slight issues regarding casts. --- types/ansi/ansi-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index dc6ec1f0da..b2625defa5 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -22,9 +22,9 @@ Object.keys({ }).forEach((color) => { const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); - (((<(...anything: any[]) => ansi.Cursor> cursor[color])() + ((<(...anything: any[]) => ansi.Cursor> cursor[color])() .bold() - .bg as ansi.Colorer)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() as ansi.Cursor) + .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() .write( `Hello, bold ${cname} world!\n` ) From 505c4ba3cd92a75e10c068f23d9e06937eabe154 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 12:16:07 -0300 Subject: [PATCH 0181/1121] I'm sincerely confused with TypeScript's casting mechanisms. --- types/ansi/ansi-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index b2625defa5..b2ee94a544 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -22,9 +22,9 @@ Object.keys({ }).forEach((color) => { const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); - ((<(...anything: any[]) => ansi.Cursor> cursor[color])() + (((<(...anything: any[]) => ansi.Cursor> cursor[color])() .bold() - .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() + .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() as ansi.Cursor) .write( `Hello, bold ${cname} world!\n` ) From 833ffc438b7d37a3b97e2cb4498fc74978c62d30 Mon Sep 17 00:00:00 2001 From: Micah Riggan Date: Sat, 27 Oct 2018 15:18:48 -0400 Subject: [PATCH 0182/1121] Adding typings for json-rpc-random-id Matching dslint Using declare function Header is required Adding a comment Moving export line Missing space Tslint... --- types/json-rpc-random-id/index.d.ts | 14 +++++++++++ .../json-rpc-random-id-tests.ts | 2 ++ types/json-rpc-random-id/tsconfig.json | 23 +++++++++++++++++++ types/json-rpc-random-id/tslint.json | 1 + 4 files changed, 40 insertions(+) create mode 100644 types/json-rpc-random-id/index.d.ts create mode 100644 types/json-rpc-random-id/json-rpc-random-id-tests.ts create mode 100644 types/json-rpc-random-id/tsconfig.json create mode 100644 types/json-rpc-random-id/tslint.json diff --git a/types/json-rpc-random-id/index.d.ts b/types/json-rpc-random-id/index.d.ts new file mode 100644 index 0000000000..14b5ba0ff0 --- /dev/null +++ b/types/json-rpc-random-id/index.d.ts @@ -0,0 +1,14 @@ +// Type definitions for json-rpc-random-id 1.0 +// Project: https://github.com/kumavis/json-rpc-random-id#readme +// Definitions by: Micah Riggan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/** + * Returns a function that generates a random number + * This number is to be used with web3 rpc + */ +declare function IdIterator(options?: { + max?: number; + start?: number; +}): () => number; + +export = IdIterator; diff --git a/types/json-rpc-random-id/json-rpc-random-id-tests.ts b/types/json-rpc-random-id/json-rpc-random-id-tests.ts new file mode 100644 index 0000000000..c71a7581e8 --- /dev/null +++ b/types/json-rpc-random-id/json-rpc-random-id-tests.ts @@ -0,0 +1,2 @@ +import jsonRPCRandomID = require("json-rpc-random-id"); +const generateId = jsonRPCRandomID(); diff --git a/types/json-rpc-random-id/tsconfig.json b/types/json-rpc-random-id/tsconfig.json new file mode 100644 index 0000000000..c39a0a4e2b --- /dev/null +++ b/types/json-rpc-random-id/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes":true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "json-rpc-random-id-tests.ts" + ] +} diff --git a/types/json-rpc-random-id/tslint.json b/types/json-rpc-random-id/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/json-rpc-random-id/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 48877e1cdfdcd6b62ac6a6640041ef8316a71fef Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 12:51:54 -0300 Subject: [PATCH 0183/1121] This cast *shall* work... --- types/ansi/ansi-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index b2ee94a544..cfac4aada9 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -22,9 +22,9 @@ Object.keys({ }).forEach((color) => { const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); - (((<(...anything: any[]) => ansi.Cursor> cursor[color])() + ((((<(...anything: any[]) => ansi.Cursor> cursor[color])() .bold() - .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() as ansi.Cursor) + .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']())) .write( `Hello, bold ${cname} world!\n` ) From 9177bcb136b992b7de8d4bb0bede068f9ebe553c Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 13:04:36 -0300 Subject: [PATCH 0184/1121] Forcing TypeScript >= 2.1 is the only apparent way. --- types/ansi/ansi-tests.ts | 4 ++-- types/ansi/index.d.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index cfac4aada9..b2625defa5 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -22,9 +22,9 @@ Object.keys({ }).forEach((color) => { const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`); - ((((<(...anything: any[]) => ansi.Cursor> cursor[color])() + ((<(...anything: any[]) => ansi.Cursor> cursor[color])() .bold() - .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']())) + .bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']() .write( `Hello, bold ${cname} world!\n` ) diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index e050aa7c22..e027df4c98 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -2,6 +2,7 @@ // Project: https://www.npmjs.com/package/ansi // Definitions by: Gustavo6046 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript version: 2.1 /** * References: From b690c77277e30f375c5fe1dbfad3fbaa09928436 Mon Sep 17 00:00:00 2001 From: Arjan Jassal Date: Thu, 1 Nov 2018 10:55:52 -0700 Subject: [PATCH 0185/1121] use esModuleInterop --- types/styled-theming/index.d.ts | 2 +- types/styled-theming/tsconfig.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/styled-theming/index.d.ts b/types/styled-theming/index.d.ts index 227fb5aba1..a9147f6e5e 100644 --- a/types/styled-theming/index.d.ts +++ b/types/styled-theming/index.d.ts @@ -28,4 +28,4 @@ declare namespace theme { ): VariantSet; } -export default theme; +export = theme; diff --git a/types/styled-theming/tsconfig.json b/types/styled-theming/tsconfig.json index 790a9ddd81..57714000f6 100644 --- a/types/styled-theming/tsconfig.json +++ b/types/styled-theming/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "esModuleInterop": true, "module": "commonjs", "lib": ["es6"], "noImplicitAny": true, From 20b366a5758aa03da779e1ef1cff85857c7675ca Mon Sep 17 00:00:00 2001 From: Arne Schubert Date: Thu, 1 Nov 2018 19:11:10 +0100 Subject: [PATCH 0186/1121] Fix leaflet-provider after changes on leaflet --- types/leaflet-providers/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/leaflet-providers/index.d.ts b/types/leaflet-providers/index.d.ts index bc9a4576de..c92eeea96f 100644 --- a/types/leaflet-providers/index.d.ts +++ b/types/leaflet-providers/index.d.ts @@ -9,7 +9,7 @@ import * as L from 'leaflet'; declare module 'leaflet' { namespace TileLayer { class Provider extends TileLayer { - constructor(provider: string, options?: TileLayerOptions) + constructor(provider: string, options?: TileLayerOptions & { [name: string]: string; }) } namespace Provider { @@ -28,6 +28,6 @@ declare module 'leaflet' { } namespace tileLayer { - function provider(provider: string, options?: TileLayerOptions): TileLayer.Provider; + function provider(provider: string, options?: TileLayerOptions & { [name: string]: string; }): TileLayer.Provider; } } From 44d0caac7cfa8808fee9558dc558e247efe9a54e Mon Sep 17 00:00:00 2001 From: Andy Date: Tue, 30 Oct 2018 16:24:30 +0100 Subject: [PATCH 0187/1121] [lingui/core] Setup params locales and missing Solves #30136 --- types/lingui__core/i18n.d.ts | 2 ++ types/lingui__core/index.d.ts | 2 +- types/lingui__core/lingui__core-tests.ts | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/lingui__core/i18n.d.ts b/types/lingui__core/i18n.d.ts index 49f663a6a8..a74ae7a7a0 100644 --- a/types/lingui__core/i18n.d.ts +++ b/types/lingui__core/i18n.d.ts @@ -27,6 +27,8 @@ export interface setupI18nProps { language?: string; catalogs?: Catalogs; development?: object; + locales?: string[]; + missing?: string | ((language: string, id: string) => string); } export class I18n { diff --git a/types/lingui__core/index.d.ts b/types/lingui__core/index.d.ts index e70f62f969..9628f85634 100644 --- a/types/lingui__core/index.d.ts +++ b/types/lingui__core/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @lingui/core 2.1 +// Type definitions for @lingui/core 2.2 // Project: https://lingui.github.io/js-lingui/ // Definitions by: Jeow Li Huan // Definitions: https://github.com/huan086/lingui-typings diff --git a/types/lingui__core/lingui__core-tests.ts b/types/lingui__core/lingui__core-tests.ts index 799bc5812b..09af3e1e4f 100644 --- a/types/lingui__core/lingui__core-tests.ts +++ b/types/lingui__core/lingui__core-tests.ts @@ -80,8 +80,17 @@ const catalog: Catalog = { } } }; + +function missingFn(language: string, id: string) { + return id; +} + const catalogs: Catalogs = { es: catalog }; const setupResult: I18n = setupI18n({ catalogs, language: 'es' }); +const setupResultLocales: I18n = setupI18n({ locales: ['en-UK', 'ar-AS'] }); +const setupResultMissingText: I18n = setupI18n({ missing: 'missing' }); +const setupResultMissingFn: I18n = setupI18n({ missing: missingFn }); +const setupResultCombined: I18n = setupI18n({ catalogs, language: 'de', locales: ['en-UK', 'ar-AS'], missing: missingFn }); const formattedDate: string = date('en', { timeZone: 'UTC' })(new Date()); const formattedNumber: string = number('en', { style: 'currency', currency: 'EUR' })(1234.56); From b8cd3c9f09c967ea3473b217ecba650afc2159bc Mon Sep 17 00:00:00 2001 From: Dhaifallah Alwadani Date: Thu, 1 Nov 2018 23:19:02 +0300 Subject: [PATCH 0188/1121] Update test to use new props --- .../react-native-popup-dialog-tests.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx b/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx index 379d4fd788..95bfa66f4e 100644 --- a/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx +++ b/types/react-native-popup-dialog/react-native-popup-dialog-tests.tsx @@ -72,7 +72,7 @@ class Test extends React.Component { dismissOnTouchOutside={false} dismissOnHardwareBackPress={false} haveOverlay={true} - show={true} + visible={true} onShown={() => { console.log('onShown'); }} onDismissed={() => { console.log('onDismissed'); }} /> From 16e2d5c048ffc5932250ad289f61cd2a7453ead8 Mon Sep 17 00:00:00 2001 From: James McKenzie Date: Thu, 1 Nov 2018 21:13:31 +0000 Subject: [PATCH 0189/1121] rearrange types to match rebass hierachy, remove unnecessary properties --- types/rebass/index.d.ts | 136 ++++++++++++++++------------------ types/rebass/rebass-tests.tsx | 1 - 2 files changed, 63 insertions(+), 74 deletions(-) diff --git a/types/rebass/index.d.ts b/types/rebass/index.d.ts index be203061ee..220f394f13 100644 --- a/types/rebass/index.d.ts +++ b/types/rebass/index.d.ts @@ -1,31 +1,36 @@ -// Type definitions for Rebass 0.3.7 +// Type definitions for Rebass 0.3.8 // Project: https://github.com/jxnblk/rebass // Definitions by: rhysd // ryee-dev +// jamesmckenzie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from "react"; export interface BaseProps extends React.ClassAttributes { - className?: string; - m?: number; - mt?: number; - mr?: number; - mb?: number; - ml?: number; - mx?: number; - my?: number; - p?: number; - pt?: number; - pr?: number; - pb?: number; - pl?: number; - px?: number; - py?: number; + className?: string; + as?: string; } -export interface BoxProps extends BaseProps { +export interface SpaceProps extends BaseProps { + m?: number; + mt?: number; + mr?: number; + mb?: number; + ml?: number; + mx?: number; + my?: number; + p?: number; + pt?: number; + pr?: number; + pb?: number; + pl?: number; + px?: number; + py?: number; +} + +export interface BoxProps extends SpaceProps { className?: string; width?: number | number[]; fontSize?: number | number[]; @@ -36,82 +41,67 @@ export interface BoxProps extends BaseProps { type BoxClass = React.StatelessComponent; export declare const Box: BoxClass; -export interface ButtonProps extends BaseProps { - fontWeight?: string; - border?: number; - borderColor?: string; - borderRadius?: number; - variant?: string; - bg?: string; - color?: string; +export interface ButtonProps extends BoxProps { + fontWeight?: string; + border?: number; + borderColor?: string; + borderRadius?: number; + variant?: string; } type ButtonClass = React.StatelessComponent; export declare const Button: ButtonClass; -export interface CardProps extends BaseProps { - border?: number; - borderColor?: string; - borderRadius?: number; - boxShadow?: string; - bg?: string; - backgroundImage?: string; - backgroundSize?: string; - backgroundPosition?: string; - backgroundRepeat?: string; - opacity?: number; - fontSize?: number | number[]; - fontWeight?: string; - width?: number | number[]; +export interface CardProps extends BoxProps { + border?: number; + borderColor?: string; + borderRadius?: number; + boxShadow?: string; + backgroundImage?: string; + backgroundSize?: string; + backgroundPosition?: string; + backgroundRepeat?: string; + opacity?: number; + variant?: string; } type CardClass = React.StatelessComponent; export declare const Card: CardClass; -export interface FlexProps extends BaseProps { - alignItems?: string; - justifyContent?: string, - flexDirection?: string, - flexWrap?: string, - width?: number | number[]; +export interface FlexProps extends BoxProps { + alignItems?: string; + justifyContent?: string; + flexDirection?: string; + flexWrap?: string; } -type FlexClass = React.StatelessComponent +type FlexClass = React.StatelessComponent; export declare const Flex: FlexClass; -export interface HeadingProps extends BaseProps { - fontSize?: number | number[]; - fontWeight?: string; - color?: string; - fontFamily?: string; - textAlign?: string; - lineHeight?: number; - letterSpacing?: number; -} -type HeadingClass = React.StatelessComponent -export declare const Heading: HeadingClass; - -export interface ImageProps extends BaseProps { +export interface ImageProps extends BoxProps { height?: number; borderRadius?: number; src?: string; alt?: string; - width?: number | number[]; } -type ImageClass = React.StatelessComponent +type ImageClass = React.StatelessComponent; export declare const Image: ImageClass; -export interface LinkProps extends BaseProps { - href?: string; +export interface LinkProps extends BoxProps { + href?: string; } -type LinkClass = React.StatelessComponent +type LinkClass = React.StatelessComponent; export declare const Link: LinkClass; -export interface TextProps extends BaseProps { - fontSize?: number | number[]; - fontWeight?: string; - color?: string; - fontFamily?: string; - textAlign?: string; - lineHeight?: number; - letterSpacing?: number; +export interface TextProps extends BoxProps { + fontSize?: number | number[]; + fontWeight?: string; + color?: string; + fontFamily?: string; + textAlign?: string; + lineHeight?: number; + letterSpacing?: number; } -type TextClass = React.StatelessComponent +type TextClass = React.StatelessComponent; export declare const Text: TextClass; + +export interface HeadingProps extends TextProps {} +type HeadingClass = React.StatelessComponent; +export declare const Heading: HeadingClass; diff --git a/types/rebass/rebass-tests.tsx b/types/rebass/rebass-tests.tsx index cc701a5c71..5980963829 100644 --- a/types/rebass/rebass-tests.tsx +++ b/types/rebass/rebass-tests.tsx @@ -8,7 +8,6 @@ const RebassTests = () => ( Hi, I'm text. Date: Thu, 1 Nov 2018 14:25:17 -0700 Subject: [PATCH 0190/1121] Add changed method on TextMarker The TextMarker definition is missing the `changed` method as defined [here](https://github.com/codemirror/CodeMirror/blob/master/src/model/mark_text.js#L111-L131). --- types/codemirror/index.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/types/codemirror/index.d.ts b/types/codemirror/index.d.ts index c1ea6c99b9..86e9067b3e 100644 --- a/types/codemirror/index.d.ts +++ b/types/codemirror/index.d.ts @@ -4,6 +4,7 @@ // nrbernard // Pr1st0n // rileymiller +// toddself // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = CodeMirror; @@ -706,8 +707,27 @@ declare namespace CodeMirror { or undefined if the marker is no longer in the document. */ find(): {from: CodeMirror.Position, to: CodeMirror.Position}; + /** Called when you've done something that might change the size of the marker and want to cheaply update the display*/ + changed(): void; + /** Returns an object representing the options for the marker. If copyWidget is given true, it will clone the value of the replacedWith option, if any. */ getOptions(copyWidget: boolean): CodeMirror.TextMarkerOptions; + + /** Fired when the cursor enters the marked range */ + on(eventName: 'beforeCursorEnter', handler: () => void) : void; + off(eventName: 'beforeCursorEnter', handler: () => void) : void; + + /** Fired when the range is cleared, either through cursor movement in combination with clearOnEnter or through a call to its clear() method */ + on(eventName: 'clear', handler: (from: Position, to: Position) => void) : void; + off(eventName: 'clear', handler: () => void) : void; + + /** Fired when the last part of the marker is removed from the document by editing operations */ + on(eventName: 'hide', handler: () => void) : void; + off(eventname: 'hide', handler: () => void) : void; + + /** Fired when, after the marker was removed by editing, a undo operation brough the marker back */ + on(eventName: 'unhide', handler: () => void) : void; + off(eventname: 'unhide', handler: () => void) : void; } interface LineWidget { From 5dd8f459c6aff79bcec4d0c83625c24ed2318c2a Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 19:21:47 -0300 Subject: [PATCH 0191/1121] Fixed header. --- types/ansi/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index e027df4c98..61b7a515df 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/ansi // Definitions by: Gustavo6046 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript version: 2.1 +// TypeScript version: 2.1 /** * References: From dac8f708b0265f7ca46688377f4abc05252f75f0 Mon Sep 17 00:00:00 2001 From: Max Beatty Date: Thu, 1 Nov 2018 15:44:38 -0700 Subject: [PATCH 0192/1121] [dotenv] Update types for v6.1.0 --- types/dotenv/dotenv-tests.ts | 26 +++++------ types/dotenv/index.d.ts | 85 ++++++++++++++++++++++-------------- 2 files changed, 64 insertions(+), 47 deletions(-) diff --git a/types/dotenv/dotenv-tests.ts b/types/dotenv/dotenv-tests.ts index 613da3b056..2776e6d202 100644 --- a/types/dotenv/dotenv-tests.ts +++ b/types/dotenv/dotenv-tests.ts @@ -1,20 +1,18 @@ -import dotenv = require('dotenv'); +import dotenv = require("dotenv"); const env = dotenv.config(); -const dbUrl: string | null = env.error || !env.parsed ? null : env.parsed['DATABASE_URL']; +const dbUrl: string | null = env.error || !env.parsed ? null : env.parsed["BASIC"]; -dotenv.config({ - path: '.env' +dotenv.load({ + path: ".env-example", + encoding: "utf8", + debug: true }); -dotenv.config({ - encoding: 'utf8' +const parsed = dotenv.parse("NODE_ENV=production\nDB_HOST=a.b.c"); +const dbHost: string = parsed["DB_HOST"]; + +const parsedFromBuffer = dotenv.parse(new Buffer("JUSTICE=league\n"), { + debug: true }); - -dotenv.load(); - -const parsed = dotenv.parse("ENVIRONMENT=production\nDEBUG=no\n"); -const debug: string = parsed['DEBUG']; - -const parsedFromBuffer = dotenv.parse(new Buffer("JUSTICE=league\n")); -const justice: string = parsedFromBuffer['JUSTICE']; +const justice: string = parsedFromBuffer["JUSTICE"]; diff --git a/types/dotenv/index.d.ts b/types/dotenv/index.d.ts index 4dd67b15c0..f8675ec22e 100644 --- a/types/dotenv/index.d.ts +++ b/types/dotenv/index.d.ts @@ -1,46 +1,65 @@ -// Type definitions for dotenv 4.0 +// Type definitions for dotenv 6.1 // Project: https://github.com/motdotla/dotenv -// Definitions by: Jussi Kinnula , Borek Bernard , Eric Naeseth +// Definitions by: Jussi Kinnula +// Borek Bernard +// Eric Naeseth +// Max Beatty // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +export interface DotenvParseOptions { + /** + * You may turn on logging to help debug why certain keys or values are not being set as you expect. + */ + debug?: boolean; +} + +export interface DotenvParseOutput { + [name: string]: string; +} + /** * Parses a string or buffer in the .env file format into an object. + * + * @param src - contents to be parsed + * @param options - additional options + * @returns an object with keys and values based on `src` */ -export function parse(src: string | Buffer): {[name: string]: string}; +export function parse( + src: string | Buffer, + options?: DotenvParseOptions +): DotenvParseOutput; + +export interface DotenvConfigOptions { + /** + * You may specify a custom path if your file containing environment variables is located elsewhere. + */ + path?: string; + + /** + * You may specify the encoding of your file containing environment variables. + */ + encoding?: string; + + /** + * You may turn on logging to help debug why certain keys or values are not being set as you expect. + */ + debug?: boolean; +} + +export interface DotenvConfigOutput { + error?: Error; + parsed?: DotenvParseOutput; +} /** - * Loads `.env` into `process.env`. - * - * @return Object Object with either - * - "parsed" containing the parsed keys and values or - * - "error" containing an Error object - * + * Loads `.env` file contents into {@link https://nodejs.org/api/process.html#process_process_env | `process.env`}. * Example: 'KEY=value' becomes { parsed: { KEY: 'value' } } + * + * @param options - controls behavior + * @returns an object with a `parsed` key if successful or `error` key if an error occurred + * */ -export function config(options?: DotenvOptions): DotenvResult; +export function config(options?: DotenvConfigOptions): DotenvConfigOutput; export const load: typeof config; - -export interface DotenvOptions { - /** - * You can specify a custom path if your file containing environment variables is named or located differently. - * - * @default '.env' - */ - path?: string; - - /** - * You may specify the encoding of your file containing environment variables using this option. - * - * @default 'utf8' - */ - encoding?: string; -} - -export interface DotenvResult { - error?: Error; - parsed?: { - [name: string]: string; - }; -} From 91fbb0796f5a7888c2c37cd51e2389373ac23364 Mon Sep 17 00:00:00 2001 From: Max Beatty Date: Thu, 1 Nov 2018 15:56:52 -0700 Subject: [PATCH 0193/1121] fix dotenv-safe type reference --- types/dotenv-safe/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/dotenv-safe/index.d.ts b/types/dotenv-safe/index.d.ts index c4d4398da8..3004b98ba6 100644 --- a/types/dotenv-safe/index.d.ts +++ b/types/dotenv-safe/index.d.ts @@ -50,11 +50,11 @@ export interface DotenvSafeOptions { * * @throws MissingEnvVarsError */ -export function load(options?: DotenvSafeOptions): env.DotenvResult +export function load(options?: DotenvSafeOptions): env.DotenvConfigOutput /** * Loads environment variables file into 'process.env'. * * @throws MissingEnvVarsError */ -export function config(options?: DotenvSafeOptions): env.DotenvResult +export function config(options?: DotenvSafeOptions): env.DotenvConfigOutput From 9ab531176b5d06c618132e3e67500fca51b6ad13 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 20:08:30 -0300 Subject: [PATCH 0194/1121] Why isn't the version declaration working? --- types/ansi/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index 61b7a515df..4e486d61ef 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/ansi // Definitions by: Gustavo6046 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript version: 2.1 +// TypeScript Version: 2.1 /** * References: From 862d10038fb50556d33b8e8d3a141242b4276c38 Mon Sep 17 00:00:00 2001 From: Will Soto Date: Thu, 1 Nov 2018 19:52:41 -0400 Subject: [PATCH 0195/1121] Remove patch version from knex typings. Only MAJOR.MINOR Signed-off-by: Will Soto --- types/knex/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/knex/index.d.ts b/types/knex/index.d.ts index 3aefe33dca..f1d0083756 100644 --- a/types/knex/index.d.ts +++ b/types/knex/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Knex.js 0.15.2 +// Type definitions for Knex.js 0.15 // Project: https://github.com/tgriesser/knex // Definitions by: Qubo // Pablo Rodríguez From 316b5156163d953cbf1b83c10e8d9e51f58cd365 Mon Sep 17 00:00:00 2001 From: Duong Tran Date: Fri, 2 Nov 2018 11:07:26 +1100 Subject: [PATCH 0196/1121] remove mobx-cookie type definition --- notNeededPackages.json | 3514 ++++++++++++------------ types/mobx-cookie/index.d.ts | 17 - types/mobx-cookie/mobx-cookie-tests.ts | 11 - types/mobx-cookie/tsconfig.json | 23 - types/mobx-cookie/tslint.json | 1 - 5 files changed, 1760 insertions(+), 1806 deletions(-) delete mode 100644 types/mobx-cookie/index.d.ts delete mode 100644 types/mobx-cookie/mobx-cookie-tests.ts delete mode 100644 types/mobx-cookie/tsconfig.json delete mode 100644 types/mobx-cookie/tslint.json diff --git a/notNeededPackages.json b/notNeededPackages.json index f81984b338..f65078a775 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1,1756 +1,1762 @@ { - "packages": [ - { - "libraryName": "3d-bin-packing", - "typingsPackageName": "3d-bin-packing", - "sourceRepoURL": "https://github.com/betterwaysystems/packer", - "asOfVersion": "1.1.3" - }, - { - "libraryName": "Ably Realtime and Rest client library", - "typingsPackageName": "ably", - "sourceRepoURL": "https://www.ably.io/", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "ag-grid", - "typingsPackageName": "ag-grid", - "sourceRepoURL": "https://github.com/ceolter/ag-grid", - "asOfVersion": "3.2.0" - }, - { - "libraryName": "ajv", - "typingsPackageName": "ajv", - "sourceRepoURL": "https://github.com/epoberezkin/ajv", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "angular-touchspin", - "typingsPackageName": "angular-touchspin", - "sourceRepoURL": "https://github.com/nkovacic/angular-touchspin", - "asOfVersion": "1.8.2" - }, - { - "libraryName": "angular-ui-router-default", - "typingsPackageName": "angular-ui-router-default", - "sourceRepoURL": "https://github.com/nonplus/angular-ui-router-default", - "asOfVersion": "0.0.5" - }, - { - "libraryName": "angular-ui-router-uib-modal", - "typingsPackageName": "angular-ui-router-uib-modal", - "sourceRepoURL": "https://github.com/nonplus/angular-ui-router-uib-modal", - "asOfVersion": "0.0.11" - }, - { - "libraryName": "antd", - "typingsPackageName": "antd", - "sourceRepoURL": "https://github.com/ant-design/ant-design", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "anydb-sql", - "typingsPackageName": "anydb-sql", - "sourceRepoURL": "https://github.com/doxout/anydb-sql", - "asOfVersion": "0.6.46" - }, - { - "libraryName": "anydb-sql-migrations", - "typingsPackageName": "anydb-sql-migrations", - "sourceRepoURL": "https://github.com/spion/anydb-sql-migrations", - "asOfVersion": "2.1.1" - }, - { - "libraryName": "apn", - "typingsPackageName": "apn", - "sourceRepoURL": "https://github.com/node-apn/node-apn", - "asOfVersion": "2.1.2" - }, - { - "libraryName": "Application Insights", - "typingsPackageName": "applicationinsights", - "sourceRepoURL": "https://github.com/Microsoft/ApplicationInsights-node.js", - "asOfVersion": "0.20.0" - }, - { - "libraryName": "Argon2", - "typingsPackageName": "argon2", - "sourceRepoURL": "https://github.com/ranisalt/node-argon2", - "asOfVersion": "0.15.0" - }, - { - "libraryName": "artyom.js", - "typingsPackageName": "artyom.js", - "sourceRepoURL": "https://github.com/sdkcarlos/artyom.js", - "asOfVersion": "1.0.6" - }, - { - "libraryName": "askmethat-rating", - "typingsPackageName": "askmethat-rating", - "sourceRepoURL": "https://github.com/AlexTeixeira/Askmethat-Rating", - "asOfVersion": "0.4.0" - }, - { - "libraryName": "assertion-error", - "typingsPackageName": "assertion-error", - "sourceRepoURL": "https://github.com/chaijs/assertion-error", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "asyncblock", - "typingsPackageName": "asyncblock", - "sourceRepoURL": "https://github.com/scriby/asyncblock", - "asOfVersion": "2.2.11" - }, - { - "libraryName": "aurelia-knockout", - "typingsPackageName": "aurelia-knockout", - "sourceRepoURL": "https://github.com/code-chris/aurelia-knockout", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "autobind-decorator", - "typingsPackageName": "autobind-decorator", - "sourceRepoURL": "https://github.com/andreypopp/autobind-decorator", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "aws-sdk", - "typingsPackageName": "aws-sdk", - "sourceRepoURL": "https://github.com/aws/aws-sdk-js", - "asOfVersion": "2.7.0" - }, - { - "libraryName": "axe-core", - "typingsPackageName": "axe-core", - "sourceRepoURL": "https://github.com/dequelabs/axe-core", - "asOfVersion": "3.0.3" - }, - { - "libraryName": "axios", - "typingsPackageName": "axios", - "sourceRepoURL": "https://github.com/mzabriskie/axios", - "asOfVersion": "0.14.0" - }, - { - "libraryName": "axios-mock-adapter", - "typingsPackageName": "axios-mock-adapter", - "sourceRepoURL": "https://github.com/ctimmerm/axios-mock-adapter", - "asOfVersion": "1.10.0" - }, - { - "libraryName": "azure-mobile-apps", - "typingsPackageName": "azure-mobile-apps", - "sourceRepoURL": "https://github.com/Azure/azure-mobile-apps-node/", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "BabylonJS", - "typingsPackageName": "babylonjs", - "sourceRepoURL": "http://www.babylonjs.com/", - "asOfVersion": "2.4.1" - }, - { - "libraryName": "base64url", - "typingsPackageName": "base64url", - "sourceRepoURL": "https://github.com/brianloveswords/base64url", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "BigInteger.js", - "typingsPackageName": "big-integer", - "sourceRepoURL": "https://github.com/peterolson/BigInteger.js", - "asOfVersion": "0.0.31" - }, - { - "libraryName": "bignumber.js", - "typingsPackageName": "bignumber.js", - "sourceRepoURL": "https://github.com/MikeMcl/bignumber.js/", - "asOfVersion": "5.0.0" - }, - { - "libraryName": "bingmaps", - "typingsPackageName": "bingmaps", - "sourceRepoURL": "https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions", - "asOfVersion": "2.0.15" - }, - { - "libraryName": "bitwise", - "typingsPackageName": "bitwise", - "sourceRepoURL": "https://github.com/dodekeract/bitwise", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "botvs", - "typingsPackageName": "botvs", - "sourceRepoURL": "https://www.botvs.com/", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "Bowser", - "typingsPackageName": "bowser", - "sourceRepoURL": "https://github.com/ded/bowser", - "asOfVersion": "1.1.1" - }, - { - "libraryName": "Bugsnag Browser", - "typingsPackageName": "bugsnag-js", - "sourceRepoURL": "https://github.com/bugsnag/bugsnag-js", - "asOfVersion": "3.1.0" - }, - { - "libraryName": "CacheFactory", - "typingsPackageName": "cachefactory", - "sourceRepoURL": "https://github.com/jmdobry/CacheFactory", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "camel-case", - "typingsPackageName": "camel-case", - "sourceRepoURL": "https://github.com/blakeembrey/camel-case", - "asOfVersion": "1.2.1" - }, - { - "libraryName": "catalog", - "typingsPackageName": "catalog", - "sourceRepoURL": "https://github.com/interactivethings/catalog", - "asOfVersion": "3.5.0" - }, - { - "libraryName": "chalk", - "typingsPackageName": "chalk", - "sourceRepoURL": "https://github.com/chalk/chalk", - "asOfVersion": "2.2.0" - }, - { - "libraryName": "change-case", - "typingsPackageName": "change-case", - "sourceRepoURL": "https://github.com/blakeembrey/change-case", - "asOfVersion": "2.3.1" - }, - { - "libraryName": "cheap-ruler", - "typingsPackageName": "cheap-ruler", - "sourceRepoURL": "https://github.com/mapbox/cheap-ruler", - "asOfVersion": "2.5.0" - }, - { - "libraryName": "chunked-dc", - "typingsPackageName": "chunked-dc", - "sourceRepoURL": "https://github.com/saltyrtc/chunked-dc-js", - "asOfVersion": "0.2.2" - }, - { - "libraryName": "colors.js (colors)", - "typingsPackageName": "colors", - "sourceRepoURL": "https://github.com/Marak/colors.js", - "asOfVersion": "1.2.1" - }, - { - "libraryName": "commander", - "typingsPackageName": "commander", - "sourceRepoURL": "https://github.com/tj/commander.js", - "asOfVersion": "2.12.2" - }, - { - "libraryName": "confirmdialog", - "typingsPackageName": "confirmdialog", - "sourceRepoURL": "https://github.com/allipierre/Type-definitions-for-jquery-confirm/tree/master/types/confirmDialog-js", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "constant-case", - "typingsPackageName": "constant-case", - "sourceRepoURL": "https://github.com/blakeembrey/constant-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "cordova-plugin-battery-status", - "typingsPackageName": "cordova-plugin-battery-status", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-battery-status", - "asOfVersion": "1.2.3" - }, - { - "libraryName": "cordova-plugin-camera", - "typingsPackageName": "cordova-plugin-camera", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-camera", - "asOfVersion": "2.4.0" - }, - { - "libraryName": "cordova-plugin-contacts", - "typingsPackageName": "cordova-plugin-contacts", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-contacts", - "asOfVersion": "2.3.0" - }, - { - "libraryName": "cordova-plugin-device", - "typingsPackageName": "cordova-plugin-device", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-device", - "asOfVersion": "1.1.5" - }, - { - "libraryName": "cordova-plugin-device-motion", - "typingsPackageName": "cordova-plugin-device-motion", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-device-motion", - "asOfVersion": "1.2.4" - }, - { - "libraryName": "Apache Cordova Device Orientation plugin", - "typingsPackageName": "cordova-plugin-device-orientation", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-device-orientation", - "asOfVersion": "1.0.6" - }, - { - "libraryName": "cordova-plugin-dialogs", - "typingsPackageName": "cordova-plugin-dialogs", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-dialogs", - "asOfVersion": "1.3.2" - }, - { - "libraryName": "Apache Cordova File System plugin", - "typingsPackageName": "cordova-plugin-file", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-file", - "asOfVersion": "4.3.2" - }, - { - "libraryName": "cordova-plugin-file-transfer", - "typingsPackageName": "cordova-plugin-file-transfer", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-file-transfer", - "asOfVersion": "1.6.2" - }, - { - "libraryName": "cordova-plugin-globalization", - "typingsPackageName": "cordova-plugin-globalization", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-globalization", - "asOfVersion": "1.0.6" - }, - { - "libraryName": "cordova-plugin-inappbrowser", - "typingsPackageName": "cordova-plugin-inappbrowser", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-inappbrowser", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "cordova-plugin-media", - "typingsPackageName": "cordova-plugin-media", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-media", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "cordova-plugin-media-capture", - "typingsPackageName": "cordova-plugin-media-capture", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-media-capture", - "asOfVersion": "1.4.2" - }, - { - "libraryName": "cordova-plugin-network-information", - "typingsPackageName": "cordova-plugin-network-information", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-network-information", - "asOfVersion": "1.3.2" - }, - { - "libraryName": "cordova-plugin-splashscreen", - "typingsPackageName": "cordova-plugin-splashscreen", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-splashscreen", - "asOfVersion": "4.0.2" - }, - { - "libraryName": "Apache Cordova StatusBar plugin", - "typingsPackageName": "cordova-plugin-statusbar", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-statusbar", - "asOfVersion": "2.2.2" - }, - { - "libraryName": "Apache Cordova Vibration plugin", - "typingsPackageName": "cordova-plugin-vibration", - "sourceRepoURL": "https://github.com/apache/cordova-plugin-vibration", - "asOfVersion": "2.1.4" - }, - { - "libraryName": "cordova.plugins.diagnostic", - "typingsPackageName": "cordova.plugins.diagnostic", - "sourceRepoURL": "https://github.com/dpa99c/cordova-diagnostic-plugin", - "asOfVersion": "3.7.0" - }, - { - "libraryName": "core-decorators.js", - "typingsPackageName": "core-decorators", - "sourceRepoURL": "https://github.com/jayphelps/core-decorators.js", - "asOfVersion": "0.20.0" - }, - { - "libraryName": "cypress", - "typingsPackageName": "cypress", - "sourceRepoURL": "https://cypress.io", - "asOfVersion": "1.1.3" - }, - { - "libraryName": "date-fns", - "typingsPackageName": "date-fns", - "sourceRepoURL": "https://github.com/date-fns/date-fns", - "asOfVersion": "2.6.0" - }, - { - "libraryName": "decimal.js", - "typingsPackageName": "decimal.js", - "sourceRepoURL": "https://github.com/MikeMcl/decimal.js", - "asOfVersion": "7.4.0" - }, - { - "libraryName": "deepmerge", - "typingsPackageName": "deepmerge", - "sourceRepoURL": "git@github.com:KyleAMathews/deepmerge.git", - "asOfVersion": "2.2.0" - }, - { - "libraryName": "delay", - "typingsPackageName": "delay", - "sourceRepoURL": "https://github.com/sindresorhus/delay", - "asOfVersion": "3.1.0" - }, - { - "libraryName": "DevExtreme", - "typingsPackageName": "devextreme", - "sourceRepoURL": "http://js.devexpress.com/", - "asOfVersion": "16.2.1" - }, - { - "libraryName": "Dexie.js", - "typingsPackageName": "dexie", - "sourceRepoURL": "https://github.com/dfahlander/Dexie.js", - "asOfVersion": "1.3.1" - }, - { - "libraryName": "docker-file-parser", - "typingsPackageName": "docker-file-parser", - "sourceRepoURL": "https://github.com/joyent/docker-file-parser", - "asOfVersion": "1.0.3" - }, - { - "libraryName": "dot-case", - "typingsPackageName": "dot-case", - "sourceRepoURL": "https://github.com/blakeembrey/dot-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "dva", - "typingsPackageName": "dva", - "sourceRepoURL": "https://github.com/dvajs/dva", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "easy-x-headers", - "typingsPackageName": "easy-x-headers", - "sourceRepoURL": "https://github.com/DeadAlready/easy-x-headers", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "easy-xapi-supertest", - "typingsPackageName": "easy-xapi-supertest", - "sourceRepoURL": "https://github.com/DeadAlready/easy-xapi-supertest", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "EasyStar.js", - "typingsPackageName": "easystarjs", - "sourceRepoURL": "http://easystarjs.com/", - "asOfVersion": "0.3.1" - }, - { - "libraryName": "ecmarkup", - "typingsPackageName": "ecmarkup", - "sourceRepoURL": "https://github.com/bterlson/ecmarkup", - "asOfVersion": "3.4.0" - }, - { - "libraryName": "Egg", - "typingsPackageName": "egg", - "sourceRepoURL": "https://github.com/eggjs/egg", - "asOfVersion": "1.5.0" - }, - { - "libraryName": "electron", - "typingsPackageName": "electron", - "sourceRepoURL": "https://github.com/electron/electron", - "asOfVersion": "1.6.10" - }, - { - "libraryName": "electron-builder", - "typingsPackageName": "electron-builder", - "sourceRepoURL": "https://github.com/loopline-systems/electron-builder", - "asOfVersion": "2.8.0" - }, - { - "libraryName": "email-addresses", - "typingsPackageName": "email-addresses", - "sourceRepoURL": "https://github.com/jackbowman/email-addresses", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "email-validator", - "typingsPackageName": "email-validator", - "sourceRepoURL": "https://github.com/Sembiance/email-validator", - "asOfVersion": "1.0.6" - }, - { - "libraryName": "error-stack-parser", - "typingsPackageName": "error-stack-parser", - "sourceRepoURL": "https://github.com/stacktracejs/error-stack-parser", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "es6-error", - "typingsPackageName": "es6-error", - "sourceRepoURL": "https://github.com/bjyoungblood/es6-error", - "asOfVersion": "4.0.2" - }, - { - "libraryName": "es6-promise", - "typingsPackageName": "es6-promise", - "sourceRepoURL": "https://github.com/jakearchibald/ES6-Promise", - "asOfVersion": "3.3.0" - }, - { - "libraryName": "eventemitter2", - "typingsPackageName": "eventemitter2", - "sourceRepoURL": "https://github.com/asyncly/EventEmitter2", - "asOfVersion": "4.1.0" - }, - { - "libraryName": "EventEmitter3", - "typingsPackageName": "eventemitter3", - "sourceRepoURL": "https://github.com/primus/eventemitter3", - "asOfVersion": "2.0.2" - }, - { - "libraryName": "expr-eval", - "typingsPackageName": "expr-eval", - "sourceRepoURL": "https://github.com/silentmatt/expr-eval", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "express-validator", - "typingsPackageName": "express-validator", - "sourceRepoURL": "https://github.com/ctavan/express-validator", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "extended-listbox", - "typingsPackageName": "extended-listbox", - "sourceRepoURL": "https://github.com/code-chris/extended-listbox", - "asOfVersion": "4.0.1" - }, - { - "libraryName": "JSON-Patch", - "typingsPackageName": "fast-json-patch", - "sourceRepoURL": "https://github.com/Starcounter-Jack/JSON-Patch", - "asOfVersion": "1.1.5" - }, - { - "libraryName": "FastSimplexNoise", - "typingsPackageName": "fast-simplex-noise", - "sourceRepoURL": "https://www.npmjs.com/package/fast-simplex-noise", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "fecha", - "typingsPackageName": "fecha", - "sourceRepoURL": "https://github.com/taylorhakes/fecha", - "asOfVersion": "2.3.1" - }, - { - "libraryName": "FineUploader", - "typingsPackageName": "fine-uploader", - "sourceRepoURL": "http://fineuploader.com/", - "asOfVersion": "5.14.0" - }, - { - "libraryName": "Firebase API", - "typingsPackageName": "firebase", - "sourceRepoURL": "https://www.firebase.com/docs/javascript/firebase", - "asOfVersion": "3.2.1" - }, - { - "libraryName": "flatpickr", - "typingsPackageName": "flatpickr", - "sourceRepoURL": "https://github.com/chmln/flatpickr", - "asOfVersion": "3.1.2" - }, - { - "libraryName": "flux-standard-action", - "typingsPackageName": "flux-standard-action", - "sourceRepoURL": "https://github.com/acdlite/flux-standard-action", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "fork-ts-checker-webpack-plugin", - "typingsPackageName": "fork-ts-checker-webpack-plugin", - "sourceRepoURL": "https://github.com/Realytics/fork-ts-checker-webpack-plugin", - "asOfVersion": "0.4.5" - }, - { - "libraryName": "Foundation Sites", - "typingsPackageName": "foundation-sites", - "sourceRepoURL": "http://foundation.zurb.com/", - "asOfVersion": "6.4.3" - }, - { - "libraryName": "FullCalendar", - "typingsPackageName": "fullcalendar", - "sourceRepoURL": "http://arshaw.com/fullcalendar/", - "asOfVersion": "3.8.0" - }, - { - "libraryName": "fuse", - "typingsPackageName": "fuse", - "sourceRepoURL": "https://github.com/krisk/Fuse", - "asOfVersion": "2.6.0" - }, - { - "libraryName": "gaea-model", - "typingsPackageName": "gaea-model", - "sourceRepoURL": "https://github.com/ascoders/gaea-model", - "asOfVersion": "0.0.0" - }, - { - "libraryName": "geolib", - "typingsPackageName": "geolib", - "sourceRepoURL": "https://github.com/manuelbieh/Geolib", - "asOfVersion": "2.0.23" - }, - { - "libraryName": "github", - "typingsPackageName": "github", - "sourceRepoURL": "https://github.com/mikedeboer/node-github", - "asOfVersion": "7.1.0" - }, - { - "libraryName": "graphene-pk11", - "typingsPackageName": "graphene-pk11", - "sourceRepoURL": "https://github.com/PeculiarVentures/graphene", - "asOfVersion": "2.0.31" - }, - { - "libraryName": "griddle-react", - "typingsPackageName": "griddle-react", - "sourceRepoURL": "https://github.com/griddlegriddle/griddle", - "asOfVersion": "1.3.0" - }, - { - "libraryName": "gulp-tslint", - "typingsPackageName": "gulp-tslint", - "sourceRepoURL": "https://github.com/panuhorsmalahti/gulp-tslint", - "asOfVersion": "4.2.0" - }, - { - "libraryName": "gulp-typedoc", - "typingsPackageName": "gulp-typedoc", - "sourceRepoURL": "https://github.com/rogierschouten/gulp-typedoc", - "asOfVersion": "2.2.0" - }, - { - "libraryName": "gulp-typescript", - "typingsPackageName": "gulp-typescript", - "sourceRepoURL": "https://github.com/ivogabe/gulp-typescript", - "asOfVersion": "2.13.0" - }, - { - "libraryName": "handsontable", - "typingsPackageName": "handsontable", - "sourceRepoURL": "https://handsontable.com/", - "asOfVersion": "0.35.0" - }, - { - "libraryName": "homeworks", - "typingsPackageName": "homeworks", - "sourceRepoURL": "https://github.com/IGAWorksDev/homeworks/", - "asOfVersion": "1.0.19" - }, - { - "libraryName": "http-status-codes", - "typingsPackageName": "http-status-codes", - "sourceRepoURL": "https://github.com/prettymuchbryce/node-http-status", - "asOfVersion": "1.2.0" - }, - { - "libraryName": "iconv-lite", - "typingsPackageName": "iconv-lite", - "sourceRepoURL": "https://github.com/ashtuchkin/iconv-lite", - "asOfVersion": "0.4.14" - }, - { - "libraryName": "ids", - "typingsPackageName": "ids", - "sourceRepoURL": "https://github.com/bpmn-io/ids", - "asOfVersion": "0.2.2" - }, - { - "libraryName": "immutability-helper", - "typingsPackageName": "immutability-helper", - "sourceRepoURL": "https://github.com/kolodny/immutability-helper", - "asOfVersion": "2.6.3" - }, - { - "libraryName": "Facebook's Immutable", - "typingsPackageName": "immutable", - "sourceRepoURL": "https://github.com/facebook/immutable-js", - "asOfVersion": "3.8.7" - }, - { - "libraryName": "interactjs", - "typingsPackageName": "interact.js", - "sourceRepoURL": "https://github.com/taye/interact.js", - "asOfVersion": "1.3.0" - }, - { - "libraryName": "inversify", - "typingsPackageName": "inversify", - "sourceRepoURL": "http://inversify.io", - "asOfVersion": "2.0.33" - }, - { - "libraryName": "inversify-binding-decorators", - "typingsPackageName": "inversify-binding-decorators", - "sourceRepoURL": "https://github.com/inversify/inversify-binding-decorators", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-express-utils", - "typingsPackageName": "inversify-express-utils", - "sourceRepoURL": "https://github.com/inversify/inversify-express-utils", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-inject-decorators", - "typingsPackageName": "inversify-inject-decorators", - "sourceRepoURL": "https://github.com/inversify/inversify-inject-decorators", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-logger-middleware", - "typingsPackageName": "inversify-logger-middleware", - "sourceRepoURL": "https://github.com/inversify/inversify-logger-middleware", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "inversify-restify-utils", - "typingsPackageName": "inversify-restify-utils", - "sourceRepoURL": "https://github.com/inversify/inversify-restify-utils", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "Ionic", - "typingsPackageName": "ionic", - "sourceRepoURL": "http://ionicframework.com", - "asOfVersion": "3.19.0" - }, - { - "libraryName": "is-lower-case", - "typingsPackageName": "is-lower-case", - "sourceRepoURL": "https://github.com/blakeembrey/is-lower-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "is-plain-object", - "typingsPackageName": "is-plain-object", - "sourceRepoURL": "https://github.com/jonschlinkert/is-plain-object", - "asOfVersion": "2.0.4" - }, - { - "libraryName": "is-upper-case", - "typingsPackageName": "is-upper-case", - "sourceRepoURL": "https://github.com/blakeembrey/is-upper-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "jasmine-expect", - "typingsPackageName": "jasmine-expect", - "sourceRepoURL": "https://github.com/JamieMason/Jasmine-Matchers", - "asOfVersion": "3.8.1" - }, - { - "libraryName": "jimp", - "typingsPackageName": "jimp", - "sourceRepoURL": "https://github.com/oliver-moran/jimp#readme", - "asOfVersion": "0.2.28" - }, - { - "libraryName": "joData", - "typingsPackageName": "jodata", - "sourceRepoURL": "https://github.com/mccow002/joData", - "asOfVersion": "1.0.13" - }, - { - "libraryName": "JointJS", - "typingsPackageName": "jointjs", - "sourceRepoURL": "http://www.jointjs.com/", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "jpush-react-native", - "typingsPackageName": "jpush-react-native", - "sourceRepoURL": "https://github.com/jpush/jpush-react-native", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "jquery.ajaxfile", - "typingsPackageName": "jquery.ajaxfile", - "sourceRepoURL": "https://github.com/fpellet/jquery.ajaxFile", - "asOfVersion": "0.2.29" - }, - { - "libraryName": "js-data", - "typingsPackageName": "js-data", - "sourceRepoURL": "https://github.com/js-data/js-data", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "JSData Http Adapter", - "typingsPackageName": "js-data-http", - "sourceRepoURL": "https://github.com/js-data/js-data-http", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "JSNLog", - "typingsPackageName": "jsnlog", - "sourceRepoURL": "https://github.com/mperdeck/jsnlog.js", - "asOfVersion": "2.17.2" - }, - { - "libraryName": "jsonschema", - "typingsPackageName": "jsonschema", - "sourceRepoURL": "https://github.com/tdegrunt/jsonschema", - "asOfVersion": "1.1.1" - }, - { - "libraryName": "jsplumb", - "typingsPackageName": "jsplumb", - "sourceRepoURL": "https://github.com/jsplumb/jsPlumb", - "asOfVersion": "2.5.7" - }, - { - "libraryName": "keycloak-js", - "typingsPackageName": "keycloak-js", - "sourceRepoURL": "https://github.com/keycloak/keycloak", - "asOfVersion": "3.4.1" - }, - { - "libraryName": "knockout-paging", - "typingsPackageName": "knockout-paging", - "sourceRepoURL": "https://github.com/ErikSchierboom/knockout-paging", - "asOfVersion": "0.3.1" - }, - { - "libraryName": "knockout-pre-rendered", - "typingsPackageName": "knockout-pre-rendered", - "sourceRepoURL": "https://github.com/ErikSchierboom/knockout-pre-rendered", - "asOfVersion": "0.7.1" - }, - { - "libraryName": "koa-jwt", - "typingsPackageName": "koa-jwt", - "sourceRepoURL": "https://github.com/koajs/jwt", - "asOfVersion": "3.3.0" - }, - { - "libraryName": "lambda-phi", - "typingsPackageName": "lambda-phi", - "sourceRepoURL": "https://github.com/elitechance/lambda-phi", - "asOfVersion": "1.0.1" - }, - { - "libraryName": "ldclient-js", - "typingsPackageName": "ldclient-js", - "sourceRepoURL": "https://github.com/launchdarkly/js-client", - "asOfVersion": "1.1.11" - }, - { - "libraryName": "left-pad", - "typingsPackageName": "left-pad", - "sourceRepoURL": "https://github.com/stevemao/left-pad", - "asOfVersion": "1.2.0" - }, - { - "libraryName": "Linq.JS", - "typingsPackageName": "linq", - "sourceRepoURL": "https://linqjs.codeplex.com/", - "asOfVersion": "2.2.33" - }, - { - "libraryName": "Linq4JS", - "typingsPackageName": "linq4js", - "sourceRepoURL": "https://github.com/morrisjdev/Linq4JS", - "asOfVersion": "2.1.8" - }, - { - "libraryName": "LinqSharp", - "typingsPackageName": "linqsharp", - "sourceRepoURL": "https://github.com/brunolm/LinqSharp", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "localforage", - "typingsPackageName": "localforage", - "sourceRepoURL": "https://github.com/localForage/localForage", - "asOfVersion": "0.0.34" - }, - { - "libraryName": "localforage-cordovasqlitedriver", - "typingsPackageName": "localforage-cordovasqlitedriver", - "sourceRepoURL": "https://github.com/thgreasi/localForage-cordovaSQLiteDriver", - "asOfVersion": "1.5.0" - }, - { - "libraryName": "lodash-decorators", - "typingsPackageName": "lodash-decorators", - "sourceRepoURL": "https://github.com/steelsojka/lodash-decorators", - "asOfVersion": "4.0.0" - }, - { - "libraryName": "log4javascript", - "typingsPackageName": "log4javascript", - "sourceRepoURL": "http://log4javascript.org/", - "asOfVersion": "1.4.15" - }, - { - "libraryName": "log4js", - "typingsPackageName": "log4js", - "sourceRepoURL": "https://github.com/nomiddlename/log4js-node", - "asOfVersion": "2.3.5" - }, - { - "libraryName": "lower-case", - "typingsPackageName": "lower-case", - "sourceRepoURL": "https://github.com/blakeembrey/lower-case", - "asOfVersion": "1.1.3" - }, - { - "libraryName": "lower-case-first", - "typingsPackageName": "lower-case-first", - "sourceRepoURL": "https://github.com/blakeembrey/lower-case-first", - "asOfVersion": "1.0.1" - }, - { - "libraryName": "mali", - "typingsPackageName": "mali", - "sourceRepoURL": "https://github.com/malijs/mali", - "asOfVersion": "0.9.2" - }, - { - "libraryName": "maquette", - "typingsPackageName": "maquette", - "sourceRepoURL": "http://maquettejs.org/", - "asOfVersion": "2.1.6" - }, - { - "libraryName": "mendixmodelsdk", - "typingsPackageName": "mendixmodelsdk", - "sourceRepoURL": "http://www.mendix.com", - "asOfVersion": "0.8.1" - }, - { - "libraryName": "metisMenu", - "typingsPackageName": "metismenu", - "sourceRepoURL": "https://github.com/onokumus/metisMenu", - "asOfVersion": "2.7.1" - }, - { - "libraryName": "microgears", - "typingsPackageName": "microgears", - "sourceRepoURL": "https://github.com/marcusdb/microgears", - "asOfVersion": "4.0.5" - }, - { - "libraryName": "mobile-detect", - "typingsPackageName": "mobile-detect", - "sourceRepoURL": "http://hgoebl.github.io/mobile-detect.js/", - "asOfVersion": "1.3.4" - }, - { - "libraryName": "mobservable", - "typingsPackageName": "mobservable", - "sourceRepoURL": "github.com/mweststrate/mobservable", - "asOfVersion": "1.2.5" - }, - { - "libraryName": "mobservable-react", - "typingsPackageName": "mobservable-react", - "sourceRepoURL": "https://github.com/mweststrate/mobservable-react", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "Moment", - "typingsPackageName": "moment", - "sourceRepoURL": "https://github.com/moment/moment", - "asOfVersion": "2.13.0" - }, - { - "libraryName": "Monk", - "typingsPackageName": "monk", - "sourceRepoURL": "https://github.com/LearnBoost/monk.git", - "asOfVersion": "6.0.0" - }, - { - "libraryName": "MQTT", - "typingsPackageName": "mqtt", - "sourceRepoURL": "https://github.com/mqttjs/MQTT.js", - "asOfVersion": "2.5.0" - }, - { - "libraryName": "nano", - "typingsPackageName": "nano", - "sourceRepoURL": "https://github.com/apache/couchdb-nano", - "asOfVersion": "7.0.0" - }, - { - "libraryName": "ng-table", - "typingsPackageName": "ng-table", - "sourceRepoURL": "https://github.com/esvit/ng-table", - "asOfVersion": "2.0.1" - }, - { - "libraryName": "node-pg-migrate", - "typingsPackageName": "node-pg-migrate", - "sourceRepoURL": "https://github.com/theoephraim/node-pg-migrate#readme", - "asOfVersion": "2.15.0" - }, - { - "libraryName": "node-waves", - "typingsPackageName": "node-waves", - "sourceRepoURL": "http://fian.my.id/Waves", - "asOfVersion": "0.7.6" - }, - { - "libraryName": "Normalizr", - "typingsPackageName": "normalizr", - "sourceRepoURL": "https://github.com/paularmstrong/normalizr", - "asOfVersion": "2.0.18" - }, - { - "libraryName": "Numbro", - "typingsPackageName": "numbro", - "sourceRepoURL": "https://github.com/foretagsplatsen/numbro/", - "asOfVersion": "1.9.3" - }, - { - "libraryName": "Onsen UI", - "typingsPackageName": "onsenui", - "sourceRepoURL": "http://onsen.io", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "param-case", - "typingsPackageName": "param-case", - "sourceRepoURL": "https://github.com/blakeembrey/param-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "pascal-case", - "typingsPackageName": "pascal-case", - "sourceRepoURL": "https://github.com/blakeembrey/pascal-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "passport-client-cert", - "typingsPackageName": "passport-client-cert", - "sourceRepoURL": "https://github.com/ripjar/passport-client-cert", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "path-case", - "typingsPackageName": "path-case", - "sourceRepoURL": "https://github.com/blakeembrey/path-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "path-to-regexp", - "typingsPackageName": "path-to-regexp", - "sourceRepoURL": "https://github.com/pillarjs/path-to-regexp", - "asOfVersion": "1.7.0" - }, - { - "libraryName": "perfect-scrollbar", - "typingsPackageName": "perfect-scrollbar", - "sourceRepoURL": "https://github.com/noraesae/perfect-scrollbar", - "asOfVersion": "1.3.0" - }, - { - "libraryName": "pg-connection-string", - "typingsPackageName": "pg-connection-string", - "sourceRepoURL": "https://github.com/iceddev/pg-connection-string", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "pg-promise", - "typingsPackageName": "pg-promise", - "sourceRepoURL": "https://github.com/vitaly-t/pg-promise", - "asOfVersion": "5.4.3" - }, - { - "libraryName": "phonegap-plugin-push", - "typingsPackageName": "phonegap-plugin-push", - "sourceRepoURL": "https://github.com/phonegap/phonegap-plugin-push", - "asOfVersion": "2.1.2" - }, - { - "libraryName": "pixi-spine", - "typingsPackageName": "pixi-spine", - "sourceRepoURL": "https://github.com/pixijs/pixi-spine", - "asOfVersion": "1.4.2" - }, - { - "libraryName": "pkcs11js", - "typingsPackageName": "pkcs11js", - "sourceRepoURL": "https://github.com/PeculiarVentures/pkcs11js", - "asOfVersion": "1.0.4" - }, - { - "libraryName": "plottable", - "typingsPackageName": "plottable", - "sourceRepoURL": "http://plottablejs.org/", - "asOfVersion": "3.7.0" - }, - { - "libraryName": "poly2tri.js", - "typingsPackageName": "poly2tri", - "sourceRepoURL": "https://github.com/r3mi/poly2tri.js", - "asOfVersion": "1.4.0" - }, - { - "libraryName": "popper.js", - "typingsPackageName": "popper.js", - "sourceRepoURL": "https://github.com/FezVrasta/popper.js/", - "asOfVersion": "1.11.0" - }, - { - "libraryName": "Prando", - "typingsPackageName": "prando", - "sourceRepoURL": "https://github.com/zeh/prando", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "ProtoBuf.js", - "typingsPackageName": "protobufjs", - "sourceRepoURL": "https://github.com/dcodeIO/ProtoBuf.js", - "asOfVersion": "6.0.0" - }, - { - "libraryName": "Protractor", - "typingsPackageName": "protractor", - "sourceRepoURL": "https://github.com/angular/protractor", - "asOfVersion": "4.0.0" - }, - { - "libraryName": "qiniu", - "typingsPackageName": "qiniu", - "sourceRepoURL": "https://github.com/qiniu/nodejs-sdk", - "asOfVersion": "7.0.1" - }, - { - "libraryName": "qrcode-generator", - "typingsPackageName": "qrcode-generator", - "sourceRepoURL": "https://github.com/kazuhikoarase/qrcode-generator", - "asOfVersion": "1.0.6" - }, - { - "libraryName": "Raven JS", - "typingsPackageName": "raven-js", - "sourceRepoURL": "https://github.com/getsentry/raven-js", - "asOfVersion": "3.10.0" - }, - { - "libraryName": "raw-body", - "typingsPackageName": "raw-body", - "sourceRepoURL": "https://github.com/stream-utils/raw-body", - "asOfVersion": "2.3.0" - }, - { - "libraryName": "react-chartjs-2", - "typingsPackageName": "react-chartjs-2", - "sourceRepoURL": "https://github.com/gor181/react-chartjs-2", - "asOfVersion": "2.5.7" - }, - { - "libraryName": "react-day-picker", - "typingsPackageName": "react-day-picker", - "sourceRepoURL": "https://github.com/gpbl/react-day-picker", - "asOfVersion": "5.3.0" - }, - { - "libraryName": "react-dnd", - "typingsPackageName": "react-dnd", - "sourceRepoURL": "https://github.com/react-dnd/react-dnd", - "asOfVersion": "3.0.2" - }, - { - "libraryName": "react-dnd-html5-backend", - "typingsPackageName": "react-dnd-html5-backend", - "sourceRepoURL": "https://github.com/react-dnd/react-dnd", - "asOfVersion": "3.0.2" - }, - { - "libraryName": "react-dnd-test-backend", - "typingsPackageName": "react-dnd-test-backend", - "sourceRepoURL": "https://github.com/react-dnd/react-dnd", - "asOfVersion": "3.0.2" - }, - { - "libraryName": "react-flip-move", - "typingsPackageName": "react-flip-move", - "sourceRepoURL": "https://github.com/joshwcomeau/react-flip-move", - "asOfVersion": "2.9.12" - }, - { - "libraryName": "react-ga", - "typingsPackageName": "react-ga", - "sourceRepoURL": "https://github.com/react-ga/react-ga", - "asOfVersion": "2.3.0" - }, - { - "libraryName": "react-i18next", - "typingsPackageName": "react-i18next", - "sourceRepoURL": "https://github.com/i18next/react-i18next", - "asOfVersion": "8.1.0" - }, - { - "libraryName": "react-monaco-editor", - "typingsPackageName": "react-monaco-editor", - "sourceRepoURL": "https://github.com/superRaytin/react-monaco-editor", - "asOfVersion": "0.16.0" - }, - { - "libraryName": "react-native-collapsible", - "typingsPackageName": "react-native-collapsible", - "sourceRepoURL": "https://github.com/oblador/react-native-collapsible", - "asOfVersion": "0.11.0" - }, - { - "libraryName": "react-native-elements", - "typingsPackageName": "react-native-elements", - "sourceRepoURL": "https://github.com/react-native-training/react-native-elements", - "asOfVersion": "0.18.0" - }, - { - "libraryName": "react-native-goby", - "typingsPackageName": "react-native-goby", - "sourceRepoURL": "https://gitlab.com/MessageDream/react-native-goby", - "asOfVersion": "0.0.5" - }, - { - "libraryName": "react-native-google-analytics-bridge", - "typingsPackageName": "react-native-google-analytics-bridge", - "sourceRepoURL": "https://github.com/idehub/react-native-google-analytics-bridge", - "asOfVersion": "5.3.3" - }, - { - "libraryName": "react-native-linear-gradient", - "typingsPackageName": "react-native-linear-gradient", - "sourceRepoURL": "https://github.com/react-native-community/react-native-linear-gradient", - "asOfVersion": "2.4.0" - }, - { - "libraryName": "react-native-modal", - "typingsPackageName": "react-native-modal", - "sourceRepoURL": "https://github.com/react-native-community/react-native-modal", - "asOfVersion": "4.1.1" - }, - { - "libraryName": "react-native-navigation", - "typingsPackageName": "react-native-navigation", - "sourceRepoURL": "https://github.com/wix/react-native-navigation", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "react-split-pane", - "typingsPackageName": "react-split-pane", - "sourceRepoURL": "https://github.com/tomkp/react-split-pane", - "asOfVersion": "0.1.67" - }, - { - "libraryName": "react-svg", - "typingsPackageName": "react-svg", - "sourceRepoURL": "https://github.com/tanem/react-svg", - "asOfVersion": "5.0.0" - }, - { - "libraryName": "realm", - "typingsPackageName": "realm", - "sourceRepoURL": "https://github.com/realm/realm-js", - "asOfVersion": "1.13.0" - }, - { - "libraryName": "Redux", - "typingsPackageName": "redux", - "sourceRepoURL": "https://github.com/reactjs/redux", - "asOfVersion": "3.6.0" - }, - { - "libraryName": "redux-batched-actions", - "typingsPackageName": "redux-batched-actions", - "sourceRepoURL": "https://github.com/tshelburne/redux-batched-actions", - "asOfVersion": "0.1.5" - }, - { - "libraryName": "redux-bootstrap", - "typingsPackageName": "redux-bootstrap", - "sourceRepoURL": "https://github.com/remojansen/redux-bootstrap", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "redux-devtools-extension", - "typingsPackageName": "redux-devtools-extension", - "sourceRepoURL": "https://github.com/zalmoxisus/redux-devtools-extension", - "asOfVersion": "2.13.2" - }, - { - "libraryName": "redux-little-router", - "typingsPackageName": "redux-little-router", - "sourceRepoURL": "https://github.com/FormidableLabs/redux-little-router", - "asOfVersion": "15.1.0" - }, - { - "libraryName": "redux-persist", - "typingsPackageName": "redux-persist", - "sourceRepoURL": "https://github.com/rt2zz/redux-persist", - "asOfVersion": "4.3.1" - }, - { - "libraryName": "redux-persist-transform-compress", - "typingsPackageName": "redux-persist-transform-compress", - "sourceRepoURL": "https://github.com/rt2zz/redux-persist-transform-compress", - "asOfVersion": "4.2.0" - }, - { - "libraryName": "redux-saga", - "typingsPackageName": "redux-saga", - "sourceRepoURL": "https://github.com/redux-saga/redux-saga", - "asOfVersion": "0.10.5" - }, - { - "libraryName": "redux-saga-routines", - "typingsPackageName": "redux-saga-routines", - "sourceRepoURL": "https://github.com/afitiskin/redux-saga-routines#readme", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "Redux Thunk", - "typingsPackageName": "redux-thunk", - "sourceRepoURL": "https://github.com/gaearon/redux-thunk", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "reflect-metadata", - "typingsPackageName": "reflect-metadata", - "sourceRepoURL": "https://github.com/rbuckton/ReflectDecorators", - "asOfVersion": "0.1.0" - }, - { - "libraryName": "reselect", - "typingsPackageName": "reselect", - "sourceRepoURL": "https://github.com/rackt/reselect", - "asOfVersion": "2.2.0" - }, - { - "libraryName": "rest-io", - "typingsPackageName": "rest-io", - "sourceRepoURL": "https://github.com/EnoF/rest-io", - "asOfVersion": "4.1.0" - }, - { - "libraryName": "rollup", - "typingsPackageName": "rollup", - "sourceRepoURL": "https://github.com/rollup/rollup", - "asOfVersion": "0.54.0" - }, - { - "libraryName": "route-recognizer", - "typingsPackageName": "route-recognizer", - "sourceRepoURL": "https://github.com/tildeio/route-recognizer", - "asOfVersion": "0.3.0" - }, - { - "libraryName": "router5", - "typingsPackageName": "router5", - "sourceRepoURL": "https://github.com/router5/router5", - "asOfVersion": "5.0.0" - }, - { - "libraryName": "rrule", - "typingsPackageName": "rrule", - "sourceRepoURL": "https://github.com/jakubroztocil/rrule", - "asOfVersion": "2.2.9" - }, - { - "libraryName": "rvo2", - "typingsPackageName": "rvo2", - "sourceRepoURL": "https://github.com/TNOCS/rvo2", - "asOfVersion": "1.1.0" - }, - { - "libraryName": "samchon", - "typingsPackageName": "samchon", - "sourceRepoURL": "https://github.com/samchon/framework", - "asOfVersion": "2.0.22" - }, - { - "libraryName": "samchon-framework", - "typingsPackageName": "samchon-framework", - "sourceRepoURL": "https://github.com/samchon/framework", - "asOfVersion": "2.0.21" - }, - { - "libraryName": "samchon-library", - "typingsPackageName": "samchon-library", - "sourceRepoURL": "https://github.com/samchon/framework", - "asOfVersion": "0.1.0" - }, - { - "libraryName": "node-scanf", - "typingsPackageName": "scanf", - "sourceRepoURL": "https://github.com/Lellansin/node-scanf", - "asOfVersion": "0.7.3" - }, - { - "libraryName": "sendgrid", - "typingsPackageName": "sendgrid", - "sourceRepoURL": "https://github.com/sendgrid/sendgrid-nodejs", - "asOfVersion": "4.3.0" - }, - { - "libraryName": "sentence-case", - "typingsPackageName": "sentence-case", - "sourceRepoURL": "https://github.com/blakeembrey/sentence-case", - "asOfVersion": "1.1.3" - }, - { - "libraryName": "sharp-timer", - "typingsPackageName": "sharp-timer", - "sourceRepoURL": "https://github.com/afractal/SharpTimer", - "asOfVersion": "0.1.3" - }, - { - "libraryName": "Shopify Prime", - "typingsPackageName": "shopify-prime", - "sourceRepoURL": "https://github.com/nozzlegear/shopify-prime", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "should.js", - "typingsPackageName": "should", - "sourceRepoURL": "https://github.com/shouldjs/should.js", - "asOfVersion": "13.0.0" - }, - { - "libraryName": "SimpleSignal", - "typingsPackageName": "simplesignal", - "sourceRepoURL": "https://github.com/zeh/simplesignal", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "smooth-scrollbar", - "typingsPackageName": "smooth-scrollbar", - "sourceRepoURL": "https://github.com/idiotWu/smooth-scrollbar", - "asOfVersion": "8.2.5" - }, - { - "libraryName": "Smoothie Charts", - "typingsPackageName": "smoothie", - "sourceRepoURL": "https://github.com/joewalnes/smoothie", - "asOfVersion": "1.29.1" - }, - { - "libraryName": "snake-case", - "typingsPackageName": "snake-case", - "sourceRepoURL": "https://github.com/blakeembrey/snake-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "soap", - "typingsPackageName": "soap", - "sourceRepoURL": "https://www.npmjs.com/package/soap", - "asOfVersion": "0.21.0" - }, - { - "libraryName": "source-map", - "typingsPackageName": "source-map", - "sourceRepoURL": "https://github.com/mozilla/source-map", - "asOfVersion": "0.5.7" - }, - { - "libraryName": "Spin.js", - "typingsPackageName": "spin.js", - "sourceRepoURL": "http://fgnass.github.com/spin.js/", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "spotify-web-api-js", - "typingsPackageName": "spotify-web-api-js", - "sourceRepoURL": "https://github.com/JMPerez/spotify-web-api-js", - "asOfVersion": "0.21.0" - }, - { - "libraryName": "ServiceStack Utils", - "typingsPackageName": "ss-utils", - "sourceRepoURL": "https://servicestack.net/", - "asOfVersion": "0.1.5" - }, - { - "libraryName": "striptags", - "typingsPackageName": "striptags", - "sourceRepoURL": "https://github.com/ericnorris/striptags", - "asOfVersion": "3.1.1" - }, - { - "libraryName": "Sugar", - "typingsPackageName": "sugar", - "sourceRepoURL": "https://github.com/andrewplummer/Sugar", - "asOfVersion": "2.0.2" - }, - { - "libraryName": "survey-knockout", - "typingsPackageName": "survey-knockout", - "sourceRepoURL": "http://surveyjs.org/", - "asOfVersion": "0.10.0" - }, - { - "libraryName": "svg-pan-zoom", - "typingsPackageName": "svg-pan-zoom", - "sourceRepoURL": "https://github.com/ariutta/svg-pan-zoom", - "asOfVersion": "3.4.0" - }, - { - "libraryName": "svg.js", - "typingsPackageName": "svg.js", - "sourceRepoURL": "http://www.svgjs.com/", - "asOfVersion": "2.3.1" - }, - { - "libraryName": "swap-case", - "typingsPackageName": "swap-case", - "sourceRepoURL": "https://github.com/blakeembrey/swap-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "SweetAlert", - "typingsPackageName": "sweetalert", - "sourceRepoURL": "https://github.com/t4t5/sweetalert/", - "asOfVersion": "2.0.4" - }, - { - "libraryName": "Tabris.js", - "typingsPackageName": "tabris", - "sourceRepoURL": "http://tabrisjs.com", - "asOfVersion": "1.8.0" - }, - { - "libraryName": "tcomb", - "typingsPackageName": "tcomb", - "sourceRepoURL": "http://gcanti.github.io/tcomb/guide/index.html", - "asOfVersion": "2.6.0" - }, - { - "libraryName": "timezonecomplete", - "typingsPackageName": "timezonecomplete", - "sourceRepoURL": "https://github.com/SpiritIT/timezonecomplete", - "asOfVersion": "5.5.0" - }, - { - "libraryName": "title-case", - "typingsPackageName": "title-case", - "sourceRepoURL": "https://github.com/blakeembrey/title-case", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "TsMonad", - "typingsPackageName": "tsmonad", - "sourceRepoURL": "https://github.com/cbowdon/TsMonad", - "asOfVersion": "0.5.0" - }, - { - "libraryName": "tstl", - "typingsPackageName": "tstl", - "sourceRepoURL": "https://github.com/samchon/tstl", - "asOfVersion": "1.5.7" - }, - { - "libraryName": "typed.js", - "typingsPackageName": "typed.js", - "sourceRepoURL": "https://github.com/mattboldt/typed.js", - "asOfVersion": "2.0.9" - }, - { - "libraryName": "TypeScript", - "typingsPackageName": "typescript", - "sourceRepoURL": "https://github.com/Microsoft/TypeScript", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "TypeScript", - "typingsPackageName": "typescript-services", - "sourceRepoURL": "https://github.com/Microsoft/TypeScript", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "uk.co.workingedge.phonegap.plugin.istablet", - "typingsPackageName": "uk.co.workingedge.phonegap.plugin.istablet", - "sourceRepoURL": "https://github.com/dpa99c/phonegap-istablet", - "asOfVersion": "1.1.3" - }, - { - "libraryName": "uk.co.workingedge.phonegap.plugin.launchnavigator", - "typingsPackageName": "uk.co.workingedge.phonegap.plugin.launchnavigator", - "sourceRepoURL": "https://github.com/dpa99c/phonegap-launch-navigator", - "asOfVersion": "4.0.0" - }, - { - "libraryName": "upper-case", - "typingsPackageName": "upper-case", - "sourceRepoURL": "https://github.com/blakeembrey/upper-case", - "asOfVersion": "1.1.3" - }, - { - "libraryName": "upper-case-first", - "typingsPackageName": "upper-case-first", - "sourceRepoURL": "https://github.com/blakeembrey/upper-case-first", - "asOfVersion": "1.1.2" - }, - { - "libraryName": "UUID.js", - "typingsPackageName": "uuidjs", - "sourceRepoURL": "https://github.com/LiosK/UUID.js", - "asOfVersion": "3.6.0" - }, - { - "libraryName": "Validate.js", - "typingsPackageName": "validate.js", - "sourceRepoURL": "https://github.com/ansman/validate.js", - "asOfVersion": "0.11.0" - }, - { - "libraryName": "vso-node-api", - "typingsPackageName": "vso-node-api", - "sourceRepoURL": "https://github.com/Microsoft/vso-node-api", - "asOfVersion": "4.0.0" - }, - { - "libraryName": "vuejs", - "typingsPackageName": "vue", - "sourceRepoURL": "https://github.com/vuejs/vue", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "vue-i18n", - "typingsPackageName": "vue-i18n", - "sourceRepoURL": "https://github.com/kazupon/vue-i18n", - "asOfVersion": "7.0.0" - }, - { - "libraryName": "vue-router", - "typingsPackageName": "vue-router", - "sourceRepoURL": "https://github.com/vuejs/vue-router", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "webcola", - "typingsPackageName": "webcola", - "sourceRepoURL": "https://github.com/tgdwyer/WebCola", - "asOfVersion": "3.2.0" - }, - { - "libraryName": "webgme", - "typingsPackageName": "webgme", - "sourceRepoURL": "https://webgme.org", - "asOfVersion": "2.11.0" - }, - { - "libraryName": "Webix UI", - "typingsPackageName": "webix", - "sourceRepoURL": "http://webix.com", - "asOfVersion": "5.1.1" - }, - { - "libraryName": "winston", - "typingsPackageName": "winston", - "sourceRepoURL": "https://github.com/winstonjs/winston.git", - "asOfVersion": "2.4.4" - }, - { - "libraryName": "wolfy87-eventemitter", - "typingsPackageName": "wolfy87-eventemitter", - "sourceRepoURL": "https://github.com/Wolfy87/EventEmitter", - "asOfVersion": "5.2.0" - }, - { - "libraryName": "wonder-commonlib", - "typingsPackageName": "wonder-commonlib", - "sourceRepoURL": "https://github.com/yyc-git/Wonder-CommonLib", - "asOfVersion": "0.1.12" - }, - { - "libraryName": "wonder-frp", - "typingsPackageName": "wonder-frp", - "sourceRepoURL": "https://github.com/yyc-git/Wonder-FRP", - "asOfVersion": "0.1.25" - }, - { - "libraryName": "x2js", - "typingsPackageName": "x2js", - "sourceRepoURL": "https://code.google.com/p/x2js/", - "asOfVersion": "3.1.0" - }, - { - "libraryName": "xadesjs", - "typingsPackageName": "xadesjs", - "sourceRepoURL": "https://github.com/PeculiarVentures/xadesjs", - "asOfVersion": "2.0.2" - }, - { - "libraryName": "xhr-mock", - "typingsPackageName": "xhr-mock", - "sourceRepoURL": "https://github.com/jameslnewell/xhr-mock#readme", - "asOfVersion": "2.0.0" - }, - { - "libraryName": "xlsx", - "typingsPackageName": "xlsx", - "sourceRepoURL": "https://github.com/sheetjs/js-xlsx", - "asOfVersion": "0.0.36" - }, - { - "libraryName": "xml-js", - "typingsPackageName": "xml-js", - "sourceRepoURL": "https://github.com/nashwaan/xml-js", - "asOfVersion": "1.0.0" - }, - { - "libraryName": "@xmpp/jid", - "typingsPackageName": "xmpp-jid", - "sourceRepoURL": "github.com/node-xmpp/node-xmpp/", - "asOfVersion": "1.2.0" - }, - { - "libraryName": "xterm.js", - "typingsPackageName": "xterm", - "sourceRepoURL": "https://github.com/sourcelair/xterm.js/", - "asOfVersion": "3.0.0" - }, - { - "libraryName": "yFiles for HTML", - "typingsPackageName": "yfiles", - "sourceRepoURL": "none", - "asOfVersion": "2.1.0" - }, - { - "libraryName": "zetapush-js", - "typingsPackageName": "zetapush-js", - "sourceRepoURL": "https://github.com/zetapush/zetapush-js", - "asOfVersion": "3.1.2" - }, - { - "libraryName": "Zone.js", - "typingsPackageName": "zone.js", - "sourceRepoURL": "https://github.com/angular/zone.js", - "asOfVersion": "0.5.12" - } - ] + "packages": [ + { + "libraryName": "3d-bin-packing", + "typingsPackageName": "3d-bin-packing", + "sourceRepoURL": "https://github.com/betterwaysystems/packer", + "asOfVersion": "1.1.3" + }, + { + "libraryName": "Ably Realtime and Rest client library", + "typingsPackageName": "ably", + "sourceRepoURL": "https://www.ably.io/", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "ag-grid", + "typingsPackageName": "ag-grid", + "sourceRepoURL": "https://github.com/ceolter/ag-grid", + "asOfVersion": "3.2.0" + }, + { + "libraryName": "ajv", + "typingsPackageName": "ajv", + "sourceRepoURL": "https://github.com/epoberezkin/ajv", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "angular-touchspin", + "typingsPackageName": "angular-touchspin", + "sourceRepoURL": "https://github.com/nkovacic/angular-touchspin", + "asOfVersion": "1.8.2" + }, + { + "libraryName": "angular-ui-router-default", + "typingsPackageName": "angular-ui-router-default", + "sourceRepoURL": "https://github.com/nonplus/angular-ui-router-default", + "asOfVersion": "0.0.5" + }, + { + "libraryName": "angular-ui-router-uib-modal", + "typingsPackageName": "angular-ui-router-uib-modal", + "sourceRepoURL": "https://github.com/nonplus/angular-ui-router-uib-modal", + "asOfVersion": "0.0.11" + }, + { + "libraryName": "antd", + "typingsPackageName": "antd", + "sourceRepoURL": "https://github.com/ant-design/ant-design", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "anydb-sql", + "typingsPackageName": "anydb-sql", + "sourceRepoURL": "https://github.com/doxout/anydb-sql", + "asOfVersion": "0.6.46" + }, + { + "libraryName": "anydb-sql-migrations", + "typingsPackageName": "anydb-sql-migrations", + "sourceRepoURL": "https://github.com/spion/anydb-sql-migrations", + "asOfVersion": "2.1.1" + }, + { + "libraryName": "apn", + "typingsPackageName": "apn", + "sourceRepoURL": "https://github.com/node-apn/node-apn", + "asOfVersion": "2.1.2" + }, + { + "libraryName": "Application Insights", + "typingsPackageName": "applicationinsights", + "sourceRepoURL": "https://github.com/Microsoft/ApplicationInsights-node.js", + "asOfVersion": "0.20.0" + }, + { + "libraryName": "Argon2", + "typingsPackageName": "argon2", + "sourceRepoURL": "https://github.com/ranisalt/node-argon2", + "asOfVersion": "0.15.0" + }, + { + "libraryName": "artyom.js", + "typingsPackageName": "artyom.js", + "sourceRepoURL": "https://github.com/sdkcarlos/artyom.js", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "askmethat-rating", + "typingsPackageName": "askmethat-rating", + "sourceRepoURL": "https://github.com/AlexTeixeira/Askmethat-Rating", + "asOfVersion": "0.4.0" + }, + { + "libraryName": "assertion-error", + "typingsPackageName": "assertion-error", + "sourceRepoURL": "https://github.com/chaijs/assertion-error", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "asyncblock", + "typingsPackageName": "asyncblock", + "sourceRepoURL": "https://github.com/scriby/asyncblock", + "asOfVersion": "2.2.11" + }, + { + "libraryName": "aurelia-knockout", + "typingsPackageName": "aurelia-knockout", + "sourceRepoURL": "https://github.com/code-chris/aurelia-knockout", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "autobind-decorator", + "typingsPackageName": "autobind-decorator", + "sourceRepoURL": "https://github.com/andreypopp/autobind-decorator", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "aws-sdk", + "typingsPackageName": "aws-sdk", + "sourceRepoURL": "https://github.com/aws/aws-sdk-js", + "asOfVersion": "2.7.0" + }, + { + "libraryName": "axe-core", + "typingsPackageName": "axe-core", + "sourceRepoURL": "https://github.com/dequelabs/axe-core", + "asOfVersion": "3.0.3" + }, + { + "libraryName": "axios", + "typingsPackageName": "axios", + "sourceRepoURL": "https://github.com/mzabriskie/axios", + "asOfVersion": "0.14.0" + }, + { + "libraryName": "axios-mock-adapter", + "typingsPackageName": "axios-mock-adapter", + "sourceRepoURL": "https://github.com/ctimmerm/axios-mock-adapter", + "asOfVersion": "1.10.0" + }, + { + "libraryName": "azure-mobile-apps", + "typingsPackageName": "azure-mobile-apps", + "sourceRepoURL": "https://github.com/Azure/azure-mobile-apps-node/", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "BabylonJS", + "typingsPackageName": "babylonjs", + "sourceRepoURL": "http://www.babylonjs.com/", + "asOfVersion": "2.4.1" + }, + { + "libraryName": "base64url", + "typingsPackageName": "base64url", + "sourceRepoURL": "https://github.com/brianloveswords/base64url", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "BigInteger.js", + "typingsPackageName": "big-integer", + "sourceRepoURL": "https://github.com/peterolson/BigInteger.js", + "asOfVersion": "0.0.31" + }, + { + "libraryName": "bignumber.js", + "typingsPackageName": "bignumber.js", + "sourceRepoURL": "https://github.com/MikeMcl/bignumber.js/", + "asOfVersion": "5.0.0" + }, + { + "libraryName": "bingmaps", + "typingsPackageName": "bingmaps", + "sourceRepoURL": "https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions", + "asOfVersion": "2.0.15" + }, + { + "libraryName": "bitwise", + "typingsPackageName": "bitwise", + "sourceRepoURL": "https://github.com/dodekeract/bitwise", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "botvs", + "typingsPackageName": "botvs", + "sourceRepoURL": "https://www.botvs.com/", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "Bowser", + "typingsPackageName": "bowser", + "sourceRepoURL": "https://github.com/ded/bowser", + "asOfVersion": "1.1.1" + }, + { + "libraryName": "Bugsnag Browser", + "typingsPackageName": "bugsnag-js", + "sourceRepoURL": "https://github.com/bugsnag/bugsnag-js", + "asOfVersion": "3.1.0" + }, + { + "libraryName": "CacheFactory", + "typingsPackageName": "cachefactory", + "sourceRepoURL": "https://github.com/jmdobry/CacheFactory", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "camel-case", + "typingsPackageName": "camel-case", + "sourceRepoURL": "https://github.com/blakeembrey/camel-case", + "asOfVersion": "1.2.1" + }, + { + "libraryName": "catalog", + "typingsPackageName": "catalog", + "sourceRepoURL": "https://github.com/interactivethings/catalog", + "asOfVersion": "3.5.0" + }, + { + "libraryName": "chalk", + "typingsPackageName": "chalk", + "sourceRepoURL": "https://github.com/chalk/chalk", + "asOfVersion": "2.2.0" + }, + { + "libraryName": "change-case", + "typingsPackageName": "change-case", + "sourceRepoURL": "https://github.com/blakeembrey/change-case", + "asOfVersion": "2.3.1" + }, + { + "libraryName": "cheap-ruler", + "typingsPackageName": "cheap-ruler", + "sourceRepoURL": "https://github.com/mapbox/cheap-ruler", + "asOfVersion": "2.5.0" + }, + { + "libraryName": "chunked-dc", + "typingsPackageName": "chunked-dc", + "sourceRepoURL": "https://github.com/saltyrtc/chunked-dc-js", + "asOfVersion": "0.2.2" + }, + { + "libraryName": "colors.js (colors)", + "typingsPackageName": "colors", + "sourceRepoURL": "https://github.com/Marak/colors.js", + "asOfVersion": "1.2.1" + }, + { + "libraryName": "commander", + "typingsPackageName": "commander", + "sourceRepoURL": "https://github.com/tj/commander.js", + "asOfVersion": "2.12.2" + }, + { + "libraryName": "confirmdialog", + "typingsPackageName": "confirmdialog", + "sourceRepoURL": "https://github.com/allipierre/Type-definitions-for-jquery-confirm/tree/master/types/confirmDialog-js", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "constant-case", + "typingsPackageName": "constant-case", + "sourceRepoURL": "https://github.com/blakeembrey/constant-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "cordova-plugin-battery-status", + "typingsPackageName": "cordova-plugin-battery-status", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-battery-status", + "asOfVersion": "1.2.3" + }, + { + "libraryName": "cordova-plugin-camera", + "typingsPackageName": "cordova-plugin-camera", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-camera", + "asOfVersion": "2.4.0" + }, + { + "libraryName": "cordova-plugin-contacts", + "typingsPackageName": "cordova-plugin-contacts", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-contacts", + "asOfVersion": "2.3.0" + }, + { + "libraryName": "cordova-plugin-device", + "typingsPackageName": "cordova-plugin-device", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-device", + "asOfVersion": "1.1.5" + }, + { + "libraryName": "cordova-plugin-device-motion", + "typingsPackageName": "cordova-plugin-device-motion", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-device-motion", + "asOfVersion": "1.2.4" + }, + { + "libraryName": "Apache Cordova Device Orientation plugin", + "typingsPackageName": "cordova-plugin-device-orientation", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-device-orientation", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "cordova-plugin-dialogs", + "typingsPackageName": "cordova-plugin-dialogs", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-dialogs", + "asOfVersion": "1.3.2" + }, + { + "libraryName": "Apache Cordova File System plugin", + "typingsPackageName": "cordova-plugin-file", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-file", + "asOfVersion": "4.3.2" + }, + { + "libraryName": "cordova-plugin-file-transfer", + "typingsPackageName": "cordova-plugin-file-transfer", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-file-transfer", + "asOfVersion": "1.6.2" + }, + { + "libraryName": "cordova-plugin-globalization", + "typingsPackageName": "cordova-plugin-globalization", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-globalization", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "cordova-plugin-inappbrowser", + "typingsPackageName": "cordova-plugin-inappbrowser", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-inappbrowser", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "cordova-plugin-media", + "typingsPackageName": "cordova-plugin-media", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-media", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "cordova-plugin-media-capture", + "typingsPackageName": "cordova-plugin-media-capture", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-media-capture", + "asOfVersion": "1.4.2" + }, + { + "libraryName": "cordova-plugin-network-information", + "typingsPackageName": "cordova-plugin-network-information", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-network-information", + "asOfVersion": "1.3.2" + }, + { + "libraryName": "cordova-plugin-splashscreen", + "typingsPackageName": "cordova-plugin-splashscreen", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-splashscreen", + "asOfVersion": "4.0.2" + }, + { + "libraryName": "Apache Cordova StatusBar plugin", + "typingsPackageName": "cordova-plugin-statusbar", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-statusbar", + "asOfVersion": "2.2.2" + }, + { + "libraryName": "Apache Cordova Vibration plugin", + "typingsPackageName": "cordova-plugin-vibration", + "sourceRepoURL": "https://github.com/apache/cordova-plugin-vibration", + "asOfVersion": "2.1.4" + }, + { + "libraryName": "cordova.plugins.diagnostic", + "typingsPackageName": "cordova.plugins.diagnostic", + "sourceRepoURL": "https://github.com/dpa99c/cordova-diagnostic-plugin", + "asOfVersion": "3.7.0" + }, + { + "libraryName": "core-decorators.js", + "typingsPackageName": "core-decorators", + "sourceRepoURL": "https://github.com/jayphelps/core-decorators.js", + "asOfVersion": "0.20.0" + }, + { + "libraryName": "cypress", + "typingsPackageName": "cypress", + "sourceRepoURL": "https://cypress.io", + "asOfVersion": "1.1.3" + }, + { + "libraryName": "date-fns", + "typingsPackageName": "date-fns", + "sourceRepoURL": "https://github.com/date-fns/date-fns", + "asOfVersion": "2.6.0" + }, + { + "libraryName": "decimal.js", + "typingsPackageName": "decimal.js", + "sourceRepoURL": "https://github.com/MikeMcl/decimal.js", + "asOfVersion": "7.4.0" + }, + { + "libraryName": "deepmerge", + "typingsPackageName": "deepmerge", + "sourceRepoURL": "git@github.com:KyleAMathews/deepmerge.git", + "asOfVersion": "2.2.0" + }, + { + "libraryName": "delay", + "typingsPackageName": "delay", + "sourceRepoURL": "https://github.com/sindresorhus/delay", + "asOfVersion": "3.1.0" + }, + { + "libraryName": "DevExtreme", + "typingsPackageName": "devextreme", + "sourceRepoURL": "http://js.devexpress.com/", + "asOfVersion": "16.2.1" + }, + { + "libraryName": "Dexie.js", + "typingsPackageName": "dexie", + "sourceRepoURL": "https://github.com/dfahlander/Dexie.js", + "asOfVersion": "1.3.1" + }, + { + "libraryName": "docker-file-parser", + "typingsPackageName": "docker-file-parser", + "sourceRepoURL": "https://github.com/joyent/docker-file-parser", + "asOfVersion": "1.0.3" + }, + { + "libraryName": "dot-case", + "typingsPackageName": "dot-case", + "sourceRepoURL": "https://github.com/blakeembrey/dot-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "dva", + "typingsPackageName": "dva", + "sourceRepoURL": "https://github.com/dvajs/dva", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "easy-x-headers", + "typingsPackageName": "easy-x-headers", + "sourceRepoURL": "https://github.com/DeadAlready/easy-x-headers", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "easy-xapi-supertest", + "typingsPackageName": "easy-xapi-supertest", + "sourceRepoURL": "https://github.com/DeadAlready/easy-xapi-supertest", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "EasyStar.js", + "typingsPackageName": "easystarjs", + "sourceRepoURL": "http://easystarjs.com/", + "asOfVersion": "0.3.1" + }, + { + "libraryName": "ecmarkup", + "typingsPackageName": "ecmarkup", + "sourceRepoURL": "https://github.com/bterlson/ecmarkup", + "asOfVersion": "3.4.0" + }, + { + "libraryName": "Egg", + "typingsPackageName": "egg", + "sourceRepoURL": "https://github.com/eggjs/egg", + "asOfVersion": "1.5.0" + }, + { + "libraryName": "electron", + "typingsPackageName": "electron", + "sourceRepoURL": "https://github.com/electron/electron", + "asOfVersion": "1.6.10" + }, + { + "libraryName": "electron-builder", + "typingsPackageName": "electron-builder", + "sourceRepoURL": "https://github.com/loopline-systems/electron-builder", + "asOfVersion": "2.8.0" + }, + { + "libraryName": "email-addresses", + "typingsPackageName": "email-addresses", + "sourceRepoURL": "https://github.com/jackbowman/email-addresses", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "email-validator", + "typingsPackageName": "email-validator", + "sourceRepoURL": "https://github.com/Sembiance/email-validator", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "error-stack-parser", + "typingsPackageName": "error-stack-parser", + "sourceRepoURL": "https://github.com/stacktracejs/error-stack-parser", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "es6-error", + "typingsPackageName": "es6-error", + "sourceRepoURL": "https://github.com/bjyoungblood/es6-error", + "asOfVersion": "4.0.2" + }, + { + "libraryName": "es6-promise", + "typingsPackageName": "es6-promise", + "sourceRepoURL": "https://github.com/jakearchibald/ES6-Promise", + "asOfVersion": "3.3.0" + }, + { + "libraryName": "eventemitter2", + "typingsPackageName": "eventemitter2", + "sourceRepoURL": "https://github.com/asyncly/EventEmitter2", + "asOfVersion": "4.1.0" + }, + { + "libraryName": "EventEmitter3", + "typingsPackageName": "eventemitter3", + "sourceRepoURL": "https://github.com/primus/eventemitter3", + "asOfVersion": "2.0.2" + }, + { + "libraryName": "expr-eval", + "typingsPackageName": "expr-eval", + "sourceRepoURL": "https://github.com/silentmatt/expr-eval", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "express-validator", + "typingsPackageName": "express-validator", + "sourceRepoURL": "https://github.com/ctavan/express-validator", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "extended-listbox", + "typingsPackageName": "extended-listbox", + "sourceRepoURL": "https://github.com/code-chris/extended-listbox", + "asOfVersion": "4.0.1" + }, + { + "libraryName": "JSON-Patch", + "typingsPackageName": "fast-json-patch", + "sourceRepoURL": "https://github.com/Starcounter-Jack/JSON-Patch", + "asOfVersion": "1.1.5" + }, + { + "libraryName": "FastSimplexNoise", + "typingsPackageName": "fast-simplex-noise", + "sourceRepoURL": "https://www.npmjs.com/package/fast-simplex-noise", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "fecha", + "typingsPackageName": "fecha", + "sourceRepoURL": "https://github.com/taylorhakes/fecha", + "asOfVersion": "2.3.1" + }, + { + "libraryName": "FineUploader", + "typingsPackageName": "fine-uploader", + "sourceRepoURL": "http://fineuploader.com/", + "asOfVersion": "5.14.0" + }, + { + "libraryName": "Firebase API", + "typingsPackageName": "firebase", + "sourceRepoURL": "https://www.firebase.com/docs/javascript/firebase", + "asOfVersion": "3.2.1" + }, + { + "libraryName": "flatpickr", + "typingsPackageName": "flatpickr", + "sourceRepoURL": "https://github.com/chmln/flatpickr", + "asOfVersion": "3.1.2" + }, + { + "libraryName": "flux-standard-action", + "typingsPackageName": "flux-standard-action", + "sourceRepoURL": "https://github.com/acdlite/flux-standard-action", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "fork-ts-checker-webpack-plugin", + "typingsPackageName": "fork-ts-checker-webpack-plugin", + "sourceRepoURL": "https://github.com/Realytics/fork-ts-checker-webpack-plugin", + "asOfVersion": "0.4.5" + }, + { + "libraryName": "Foundation Sites", + "typingsPackageName": "foundation-sites", + "sourceRepoURL": "http://foundation.zurb.com/", + "asOfVersion": "6.4.3" + }, + { + "libraryName": "FullCalendar", + "typingsPackageName": "fullcalendar", + "sourceRepoURL": "http://arshaw.com/fullcalendar/", + "asOfVersion": "3.8.0" + }, + { + "libraryName": "fuse", + "typingsPackageName": "fuse", + "sourceRepoURL": "https://github.com/krisk/Fuse", + "asOfVersion": "2.6.0" + }, + { + "libraryName": "gaea-model", + "typingsPackageName": "gaea-model", + "sourceRepoURL": "https://github.com/ascoders/gaea-model", + "asOfVersion": "0.0.0" + }, + { + "libraryName": "geolib", + "typingsPackageName": "geolib", + "sourceRepoURL": "https://github.com/manuelbieh/Geolib", + "asOfVersion": "2.0.23" + }, + { + "libraryName": "github", + "typingsPackageName": "github", + "sourceRepoURL": "https://github.com/mikedeboer/node-github", + "asOfVersion": "7.1.0" + }, + { + "libraryName": "graphene-pk11", + "typingsPackageName": "graphene-pk11", + "sourceRepoURL": "https://github.com/PeculiarVentures/graphene", + "asOfVersion": "2.0.31" + }, + { + "libraryName": "griddle-react", + "typingsPackageName": "griddle-react", + "sourceRepoURL": "https://github.com/griddlegriddle/griddle", + "asOfVersion": "1.3.0" + }, + { + "libraryName": "gulp-tslint", + "typingsPackageName": "gulp-tslint", + "sourceRepoURL": "https://github.com/panuhorsmalahti/gulp-tslint", + "asOfVersion": "4.2.0" + }, + { + "libraryName": "gulp-typedoc", + "typingsPackageName": "gulp-typedoc", + "sourceRepoURL": "https://github.com/rogierschouten/gulp-typedoc", + "asOfVersion": "2.2.0" + }, + { + "libraryName": "gulp-typescript", + "typingsPackageName": "gulp-typescript", + "sourceRepoURL": "https://github.com/ivogabe/gulp-typescript", + "asOfVersion": "2.13.0" + }, + { + "libraryName": "handsontable", + "typingsPackageName": "handsontable", + "sourceRepoURL": "https://handsontable.com/", + "asOfVersion": "0.35.0" + }, + { + "libraryName": "homeworks", + "typingsPackageName": "homeworks", + "sourceRepoURL": "https://github.com/IGAWorksDev/homeworks/", + "asOfVersion": "1.0.19" + }, + { + "libraryName": "http-status-codes", + "typingsPackageName": "http-status-codes", + "sourceRepoURL": "https://github.com/prettymuchbryce/node-http-status", + "asOfVersion": "1.2.0" + }, + { + "libraryName": "iconv-lite", + "typingsPackageName": "iconv-lite", + "sourceRepoURL": "https://github.com/ashtuchkin/iconv-lite", + "asOfVersion": "0.4.14" + }, + { + "libraryName": "ids", + "typingsPackageName": "ids", + "sourceRepoURL": "https://github.com/bpmn-io/ids", + "asOfVersion": "0.2.2" + }, + { + "libraryName": "immutability-helper", + "typingsPackageName": "immutability-helper", + "sourceRepoURL": "https://github.com/kolodny/immutability-helper", + "asOfVersion": "2.6.3" + }, + { + "libraryName": "Facebook's Immutable", + "typingsPackageName": "immutable", + "sourceRepoURL": "https://github.com/facebook/immutable-js", + "asOfVersion": "3.8.7" + }, + { + "libraryName": "interactjs", + "typingsPackageName": "interact.js", + "sourceRepoURL": "https://github.com/taye/interact.js", + "asOfVersion": "1.3.0" + }, + { + "libraryName": "inversify", + "typingsPackageName": "inversify", + "sourceRepoURL": "http://inversify.io", + "asOfVersion": "2.0.33" + }, + { + "libraryName": "inversify-binding-decorators", + "typingsPackageName": "inversify-binding-decorators", + "sourceRepoURL": "https://github.com/inversify/inversify-binding-decorators", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-express-utils", + "typingsPackageName": "inversify-express-utils", + "sourceRepoURL": "https://github.com/inversify/inversify-express-utils", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-inject-decorators", + "typingsPackageName": "inversify-inject-decorators", + "sourceRepoURL": "https://github.com/inversify/inversify-inject-decorators", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-logger-middleware", + "typingsPackageName": "inversify-logger-middleware", + "sourceRepoURL": "https://github.com/inversify/inversify-logger-middleware", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "inversify-restify-utils", + "typingsPackageName": "inversify-restify-utils", + "sourceRepoURL": "https://github.com/inversify/inversify-restify-utils", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "Ionic", + "typingsPackageName": "ionic", + "sourceRepoURL": "http://ionicframework.com", + "asOfVersion": "3.19.0" + }, + { + "libraryName": "is-lower-case", + "typingsPackageName": "is-lower-case", + "sourceRepoURL": "https://github.com/blakeembrey/is-lower-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "is-plain-object", + "typingsPackageName": "is-plain-object", + "sourceRepoURL": "https://github.com/jonschlinkert/is-plain-object", + "asOfVersion": "2.0.4" + }, + { + "libraryName": "is-upper-case", + "typingsPackageName": "is-upper-case", + "sourceRepoURL": "https://github.com/blakeembrey/is-upper-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "jasmine-expect", + "typingsPackageName": "jasmine-expect", + "sourceRepoURL": "https://github.com/JamieMason/Jasmine-Matchers", + "asOfVersion": "3.8.1" + }, + { + "libraryName": "jimp", + "typingsPackageName": "jimp", + "sourceRepoURL": "https://github.com/oliver-moran/jimp#readme", + "asOfVersion": "0.2.28" + }, + { + "libraryName": "joData", + "typingsPackageName": "jodata", + "sourceRepoURL": "https://github.com/mccow002/joData", + "asOfVersion": "1.0.13" + }, + { + "libraryName": "JointJS", + "typingsPackageName": "jointjs", + "sourceRepoURL": "http://www.jointjs.com/", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "jpush-react-native", + "typingsPackageName": "jpush-react-native", + "sourceRepoURL": "https://github.com/jpush/jpush-react-native", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "jquery.ajaxfile", + "typingsPackageName": "jquery.ajaxfile", + "sourceRepoURL": "https://github.com/fpellet/jquery.ajaxFile", + "asOfVersion": "0.2.29" + }, + { + "libraryName": "js-data", + "typingsPackageName": "js-data", + "sourceRepoURL": "https://github.com/js-data/js-data", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "JSData Http Adapter", + "typingsPackageName": "js-data-http", + "sourceRepoURL": "https://github.com/js-data/js-data-http", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "JSNLog", + "typingsPackageName": "jsnlog", + "sourceRepoURL": "https://github.com/mperdeck/jsnlog.js", + "asOfVersion": "2.17.2" + }, + { + "libraryName": "jsonschema", + "typingsPackageName": "jsonschema", + "sourceRepoURL": "https://github.com/tdegrunt/jsonschema", + "asOfVersion": "1.1.1" + }, + { + "libraryName": "jsplumb", + "typingsPackageName": "jsplumb", + "sourceRepoURL": "https://github.com/jsplumb/jsPlumb", + "asOfVersion": "2.5.7" + }, + { + "libraryName": "keycloak-js", + "typingsPackageName": "keycloak-js", + "sourceRepoURL": "https://github.com/keycloak/keycloak", + "asOfVersion": "3.4.1" + }, + { + "libraryName": "knockout-paging", + "typingsPackageName": "knockout-paging", + "sourceRepoURL": "https://github.com/ErikSchierboom/knockout-paging", + "asOfVersion": "0.3.1" + }, + { + "libraryName": "knockout-pre-rendered", + "typingsPackageName": "knockout-pre-rendered", + "sourceRepoURL": "https://github.com/ErikSchierboom/knockout-pre-rendered", + "asOfVersion": "0.7.1" + }, + { + "libraryName": "koa-jwt", + "typingsPackageName": "koa-jwt", + "sourceRepoURL": "https://github.com/koajs/jwt", + "asOfVersion": "3.3.0" + }, + { + "libraryName": "lambda-phi", + "typingsPackageName": "lambda-phi", + "sourceRepoURL": "https://github.com/elitechance/lambda-phi", + "asOfVersion": "1.0.1" + }, + { + "libraryName": "ldclient-js", + "typingsPackageName": "ldclient-js", + "sourceRepoURL": "https://github.com/launchdarkly/js-client", + "asOfVersion": "1.1.11" + }, + { + "libraryName": "left-pad", + "typingsPackageName": "left-pad", + "sourceRepoURL": "https://github.com/stevemao/left-pad", + "asOfVersion": "1.2.0" + }, + { + "libraryName": "Linq.JS", + "typingsPackageName": "linq", + "sourceRepoURL": "https://linqjs.codeplex.com/", + "asOfVersion": "2.2.33" + }, + { + "libraryName": "Linq4JS", + "typingsPackageName": "linq4js", + "sourceRepoURL": "https://github.com/morrisjdev/Linq4JS", + "asOfVersion": "2.1.8" + }, + { + "libraryName": "LinqSharp", + "typingsPackageName": "linqsharp", + "sourceRepoURL": "https://github.com/brunolm/LinqSharp", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "localforage", + "typingsPackageName": "localforage", + "sourceRepoURL": "https://github.com/localForage/localForage", + "asOfVersion": "0.0.34" + }, + { + "libraryName": "localforage-cordovasqlitedriver", + "typingsPackageName": "localforage-cordovasqlitedriver", + "sourceRepoURL": "https://github.com/thgreasi/localForage-cordovaSQLiteDriver", + "asOfVersion": "1.5.0" + }, + { + "libraryName": "lodash-decorators", + "typingsPackageName": "lodash-decorators", + "sourceRepoURL": "https://github.com/steelsojka/lodash-decorators", + "asOfVersion": "4.0.0" + }, + { + "libraryName": "log4javascript", + "typingsPackageName": "log4javascript", + "sourceRepoURL": "http://log4javascript.org/", + "asOfVersion": "1.4.15" + }, + { + "libraryName": "log4js", + "typingsPackageName": "log4js", + "sourceRepoURL": "https://github.com/nomiddlename/log4js-node", + "asOfVersion": "2.3.5" + }, + { + "libraryName": "lower-case", + "typingsPackageName": "lower-case", + "sourceRepoURL": "https://github.com/blakeembrey/lower-case", + "asOfVersion": "1.1.3" + }, + { + "libraryName": "lower-case-first", + "typingsPackageName": "lower-case-first", + "sourceRepoURL": "https://github.com/blakeembrey/lower-case-first", + "asOfVersion": "1.0.1" + }, + { + "libraryName": "mali", + "typingsPackageName": "mali", + "sourceRepoURL": "https://github.com/malijs/mali", + "asOfVersion": "0.9.2" + }, + { + "libraryName": "maquette", + "typingsPackageName": "maquette", + "sourceRepoURL": "http://maquettejs.org/", + "asOfVersion": "2.1.6" + }, + { + "libraryName": "mendixmodelsdk", + "typingsPackageName": "mendixmodelsdk", + "sourceRepoURL": "http://www.mendix.com", + "asOfVersion": "0.8.1" + }, + { + "libraryName": "metisMenu", + "typingsPackageName": "metismenu", + "sourceRepoURL": "https://github.com/onokumus/metisMenu", + "asOfVersion": "2.7.1" + }, + { + "libraryName": "microgears", + "typingsPackageName": "microgears", + "sourceRepoURL": "https://github.com/marcusdb/microgears", + "asOfVersion": "4.0.5" + }, + { + "libraryName": "mobile-detect", + "typingsPackageName": "mobile-detect", + "sourceRepoURL": "http://hgoebl.github.io/mobile-detect.js/", + "asOfVersion": "1.3.4" + }, + { + "libraryName": "mobservable", + "typingsPackageName": "mobservable", + "sourceRepoURL": "github.com/mweststrate/mobservable", + "asOfVersion": "1.2.5" + }, + { + "libraryName": "mobservable-react", + "typingsPackageName": "mobservable-react", + "sourceRepoURL": "https://github.com/mweststrate/mobservable-react", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "Mobx Cookie", + "typingsPackageName": "mobx-cookie", + "sourceRepoURL": "https://github.com/will-stone/mobx-cookie", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "Moment", + "typingsPackageName": "moment", + "sourceRepoURL": "https://github.com/moment/moment", + "asOfVersion": "2.13.0" + }, + { + "libraryName": "Monk", + "typingsPackageName": "monk", + "sourceRepoURL": "https://github.com/LearnBoost/monk.git", + "asOfVersion": "6.0.0" + }, + { + "libraryName": "MQTT", + "typingsPackageName": "mqtt", + "sourceRepoURL": "https://github.com/mqttjs/MQTT.js", + "asOfVersion": "2.5.0" + }, + { + "libraryName": "nano", + "typingsPackageName": "nano", + "sourceRepoURL": "https://github.com/apache/couchdb-nano", + "asOfVersion": "7.0.0" + }, + { + "libraryName": "ng-table", + "typingsPackageName": "ng-table", + "sourceRepoURL": "https://github.com/esvit/ng-table", + "asOfVersion": "2.0.1" + }, + { + "libraryName": "node-pg-migrate", + "typingsPackageName": "node-pg-migrate", + "sourceRepoURL": "https://github.com/theoephraim/node-pg-migrate#readme", + "asOfVersion": "2.15.0" + }, + { + "libraryName": "node-waves", + "typingsPackageName": "node-waves", + "sourceRepoURL": "http://fian.my.id/Waves", + "asOfVersion": "0.7.6" + }, + { + "libraryName": "Normalizr", + "typingsPackageName": "normalizr", + "sourceRepoURL": "https://github.com/paularmstrong/normalizr", + "asOfVersion": "2.0.18" + }, + { + "libraryName": "Numbro", + "typingsPackageName": "numbro", + "sourceRepoURL": "https://github.com/foretagsplatsen/numbro/", + "asOfVersion": "1.9.3" + }, + { + "libraryName": "Onsen UI", + "typingsPackageName": "onsenui", + "sourceRepoURL": "http://onsen.io", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "param-case", + "typingsPackageName": "param-case", + "sourceRepoURL": "https://github.com/blakeembrey/param-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "pascal-case", + "typingsPackageName": "pascal-case", + "sourceRepoURL": "https://github.com/blakeembrey/pascal-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "passport-client-cert", + "typingsPackageName": "passport-client-cert", + "sourceRepoURL": "https://github.com/ripjar/passport-client-cert", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "path-case", + "typingsPackageName": "path-case", + "sourceRepoURL": "https://github.com/blakeembrey/path-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "path-to-regexp", + "typingsPackageName": "path-to-regexp", + "sourceRepoURL": "https://github.com/pillarjs/path-to-regexp", + "asOfVersion": "1.7.0" + }, + { + "libraryName": "perfect-scrollbar", + "typingsPackageName": "perfect-scrollbar", + "sourceRepoURL": "https://github.com/noraesae/perfect-scrollbar", + "asOfVersion": "1.3.0" + }, + { + "libraryName": "pg-connection-string", + "typingsPackageName": "pg-connection-string", + "sourceRepoURL": "https://github.com/iceddev/pg-connection-string", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "pg-promise", + "typingsPackageName": "pg-promise", + "sourceRepoURL": "https://github.com/vitaly-t/pg-promise", + "asOfVersion": "5.4.3" + }, + { + "libraryName": "phonegap-plugin-push", + "typingsPackageName": "phonegap-plugin-push", + "sourceRepoURL": "https://github.com/phonegap/phonegap-plugin-push", + "asOfVersion": "2.1.2" + }, + { + "libraryName": "pixi-spine", + "typingsPackageName": "pixi-spine", + "sourceRepoURL": "https://github.com/pixijs/pixi-spine", + "asOfVersion": "1.4.2" + }, + { + "libraryName": "pkcs11js", + "typingsPackageName": "pkcs11js", + "sourceRepoURL": "https://github.com/PeculiarVentures/pkcs11js", + "asOfVersion": "1.0.4" + }, + { + "libraryName": "plottable", + "typingsPackageName": "plottable", + "sourceRepoURL": "http://plottablejs.org/", + "asOfVersion": "3.7.0" + }, + { + "libraryName": "poly2tri.js", + "typingsPackageName": "poly2tri", + "sourceRepoURL": "https://github.com/r3mi/poly2tri.js", + "asOfVersion": "1.4.0" + }, + { + "libraryName": "popper.js", + "typingsPackageName": "popper.js", + "sourceRepoURL": "https://github.com/FezVrasta/popper.js/", + "asOfVersion": "1.11.0" + }, + { + "libraryName": "Prando", + "typingsPackageName": "prando", + "sourceRepoURL": "https://github.com/zeh/prando", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "ProtoBuf.js", + "typingsPackageName": "protobufjs", + "sourceRepoURL": "https://github.com/dcodeIO/ProtoBuf.js", + "asOfVersion": "6.0.0" + }, + { + "libraryName": "Protractor", + "typingsPackageName": "protractor", + "sourceRepoURL": "https://github.com/angular/protractor", + "asOfVersion": "4.0.0" + }, + { + "libraryName": "qiniu", + "typingsPackageName": "qiniu", + "sourceRepoURL": "https://github.com/qiniu/nodejs-sdk", + "asOfVersion": "7.0.1" + }, + { + "libraryName": "qrcode-generator", + "typingsPackageName": "qrcode-generator", + "sourceRepoURL": "https://github.com/kazuhikoarase/qrcode-generator", + "asOfVersion": "1.0.6" + }, + { + "libraryName": "Raven JS", + "typingsPackageName": "raven-js", + "sourceRepoURL": "https://github.com/getsentry/raven-js", + "asOfVersion": "3.10.0" + }, + { + "libraryName": "raw-body", + "typingsPackageName": "raw-body", + "sourceRepoURL": "https://github.com/stream-utils/raw-body", + "asOfVersion": "2.3.0" + }, + { + "libraryName": "react-chartjs-2", + "typingsPackageName": "react-chartjs-2", + "sourceRepoURL": "https://github.com/gor181/react-chartjs-2", + "asOfVersion": "2.5.7" + }, + { + "libraryName": "react-day-picker", + "typingsPackageName": "react-day-picker", + "sourceRepoURL": "https://github.com/gpbl/react-day-picker", + "asOfVersion": "5.3.0" + }, + { + "libraryName": "react-dnd", + "typingsPackageName": "react-dnd", + "sourceRepoURL": "https://github.com/react-dnd/react-dnd", + "asOfVersion": "3.0.2" + }, + { + "libraryName": "react-dnd-html5-backend", + "typingsPackageName": "react-dnd-html5-backend", + "sourceRepoURL": "https://github.com/react-dnd/react-dnd", + "asOfVersion": "3.0.2" + }, + { + "libraryName": "react-dnd-test-backend", + "typingsPackageName": "react-dnd-test-backend", + "sourceRepoURL": "https://github.com/react-dnd/react-dnd", + "asOfVersion": "3.0.2" + }, + { + "libraryName": "react-flip-move", + "typingsPackageName": "react-flip-move", + "sourceRepoURL": "https://github.com/joshwcomeau/react-flip-move", + "asOfVersion": "2.9.12" + }, + { + "libraryName": "react-ga", + "typingsPackageName": "react-ga", + "sourceRepoURL": "https://github.com/react-ga/react-ga", + "asOfVersion": "2.3.0" + }, + { + "libraryName": "react-i18next", + "typingsPackageName": "react-i18next", + "sourceRepoURL": "https://github.com/i18next/react-i18next", + "asOfVersion": "8.1.0" + }, + { + "libraryName": "react-monaco-editor", + "typingsPackageName": "react-monaco-editor", + "sourceRepoURL": "https://github.com/superRaytin/react-monaco-editor", + "asOfVersion": "0.16.0" + }, + { + "libraryName": "react-native-collapsible", + "typingsPackageName": "react-native-collapsible", + "sourceRepoURL": "https://github.com/oblador/react-native-collapsible", + "asOfVersion": "0.11.0" + }, + { + "libraryName": "react-native-elements", + "typingsPackageName": "react-native-elements", + "sourceRepoURL": "https://github.com/react-native-training/react-native-elements", + "asOfVersion": "0.18.0" + }, + { + "libraryName": "react-native-goby", + "typingsPackageName": "react-native-goby", + "sourceRepoURL": "https://gitlab.com/MessageDream/react-native-goby", + "asOfVersion": "0.0.5" + }, + { + "libraryName": "react-native-google-analytics-bridge", + "typingsPackageName": "react-native-google-analytics-bridge", + "sourceRepoURL": "https://github.com/idehub/react-native-google-analytics-bridge", + "asOfVersion": "5.3.3" + }, + { + "libraryName": "react-native-linear-gradient", + "typingsPackageName": "react-native-linear-gradient", + "sourceRepoURL": "https://github.com/react-native-community/react-native-linear-gradient", + "asOfVersion": "2.4.0" + }, + { + "libraryName": "react-native-modal", + "typingsPackageName": "react-native-modal", + "sourceRepoURL": "https://github.com/react-native-community/react-native-modal", + "asOfVersion": "4.1.1" + }, + { + "libraryName": "react-native-navigation", + "typingsPackageName": "react-native-navigation", + "sourceRepoURL": "https://github.com/wix/react-native-navigation", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "react-split-pane", + "typingsPackageName": "react-split-pane", + "sourceRepoURL": "https://github.com/tomkp/react-split-pane", + "asOfVersion": "0.1.67" + }, + { + "libraryName": "react-svg", + "typingsPackageName": "react-svg", + "sourceRepoURL": "https://github.com/tanem/react-svg", + "asOfVersion": "5.0.0" + }, + { + "libraryName": "realm", + "typingsPackageName": "realm", + "sourceRepoURL": "https://github.com/realm/realm-js", + "asOfVersion": "1.13.0" + }, + { + "libraryName": "Redux", + "typingsPackageName": "redux", + "sourceRepoURL": "https://github.com/reactjs/redux", + "asOfVersion": "3.6.0" + }, + { + "libraryName": "redux-batched-actions", + "typingsPackageName": "redux-batched-actions", + "sourceRepoURL": "https://github.com/tshelburne/redux-batched-actions", + "asOfVersion": "0.1.5" + }, + { + "libraryName": "redux-bootstrap", + "typingsPackageName": "redux-bootstrap", + "sourceRepoURL": "https://github.com/remojansen/redux-bootstrap", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "redux-devtools-extension", + "typingsPackageName": "redux-devtools-extension", + "sourceRepoURL": "https://github.com/zalmoxisus/redux-devtools-extension", + "asOfVersion": "2.13.2" + }, + { + "libraryName": "redux-little-router", + "typingsPackageName": "redux-little-router", + "sourceRepoURL": "https://github.com/FormidableLabs/redux-little-router", + "asOfVersion": "15.1.0" + }, + { + "libraryName": "redux-persist", + "typingsPackageName": "redux-persist", + "sourceRepoURL": "https://github.com/rt2zz/redux-persist", + "asOfVersion": "4.3.1" + }, + { + "libraryName": "redux-persist-transform-compress", + "typingsPackageName": "redux-persist-transform-compress", + "sourceRepoURL": "https://github.com/rt2zz/redux-persist-transform-compress", + "asOfVersion": "4.2.0" + }, + { + "libraryName": "redux-saga", + "typingsPackageName": "redux-saga", + "sourceRepoURL": "https://github.com/redux-saga/redux-saga", + "asOfVersion": "0.10.5" + }, + { + "libraryName": "redux-saga-routines", + "typingsPackageName": "redux-saga-routines", + "sourceRepoURL": "https://github.com/afitiskin/redux-saga-routines#readme", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "Redux Thunk", + "typingsPackageName": "redux-thunk", + "sourceRepoURL": "https://github.com/gaearon/redux-thunk", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "reflect-metadata", + "typingsPackageName": "reflect-metadata", + "sourceRepoURL": "https://github.com/rbuckton/ReflectDecorators", + "asOfVersion": "0.1.0" + }, + { + "libraryName": "reselect", + "typingsPackageName": "reselect", + "sourceRepoURL": "https://github.com/rackt/reselect", + "asOfVersion": "2.2.0" + }, + { + "libraryName": "rest-io", + "typingsPackageName": "rest-io", + "sourceRepoURL": "https://github.com/EnoF/rest-io", + "asOfVersion": "4.1.0" + }, + { + "libraryName": "rollup", + "typingsPackageName": "rollup", + "sourceRepoURL": "https://github.com/rollup/rollup", + "asOfVersion": "0.54.0" + }, + { + "libraryName": "route-recognizer", + "typingsPackageName": "route-recognizer", + "sourceRepoURL": "https://github.com/tildeio/route-recognizer", + "asOfVersion": "0.3.0" + }, + { + "libraryName": "router5", + "typingsPackageName": "router5", + "sourceRepoURL": "https://github.com/router5/router5", + "asOfVersion": "5.0.0" + }, + { + "libraryName": "rrule", + "typingsPackageName": "rrule", + "sourceRepoURL": "https://github.com/jakubroztocil/rrule", + "asOfVersion": "2.2.9" + }, + { + "libraryName": "rvo2", + "typingsPackageName": "rvo2", + "sourceRepoURL": "https://github.com/TNOCS/rvo2", + "asOfVersion": "1.1.0" + }, + { + "libraryName": "samchon", + "typingsPackageName": "samchon", + "sourceRepoURL": "https://github.com/samchon/framework", + "asOfVersion": "2.0.22" + }, + { + "libraryName": "samchon-framework", + "typingsPackageName": "samchon-framework", + "sourceRepoURL": "https://github.com/samchon/framework", + "asOfVersion": "2.0.21" + }, + { + "libraryName": "samchon-library", + "typingsPackageName": "samchon-library", + "sourceRepoURL": "https://github.com/samchon/framework", + "asOfVersion": "0.1.0" + }, + { + "libraryName": "node-scanf", + "typingsPackageName": "scanf", + "sourceRepoURL": "https://github.com/Lellansin/node-scanf", + "asOfVersion": "0.7.3" + }, + { + "libraryName": "sendgrid", + "typingsPackageName": "sendgrid", + "sourceRepoURL": "https://github.com/sendgrid/sendgrid-nodejs", + "asOfVersion": "4.3.0" + }, + { + "libraryName": "sentence-case", + "typingsPackageName": "sentence-case", + "sourceRepoURL": "https://github.com/blakeembrey/sentence-case", + "asOfVersion": "1.1.3" + }, + { + "libraryName": "sharp-timer", + "typingsPackageName": "sharp-timer", + "sourceRepoURL": "https://github.com/afractal/SharpTimer", + "asOfVersion": "0.1.3" + }, + { + "libraryName": "Shopify Prime", + "typingsPackageName": "shopify-prime", + "sourceRepoURL": "https://github.com/nozzlegear/shopify-prime", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "should.js", + "typingsPackageName": "should", + "sourceRepoURL": "https://github.com/shouldjs/should.js", + "asOfVersion": "13.0.0" + }, + { + "libraryName": "SimpleSignal", + "typingsPackageName": "simplesignal", + "sourceRepoURL": "https://github.com/zeh/simplesignal", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "smooth-scrollbar", + "typingsPackageName": "smooth-scrollbar", + "sourceRepoURL": "https://github.com/idiotWu/smooth-scrollbar", + "asOfVersion": "8.2.5" + }, + { + "libraryName": "Smoothie Charts", + "typingsPackageName": "smoothie", + "sourceRepoURL": "https://github.com/joewalnes/smoothie", + "asOfVersion": "1.29.1" + }, + { + "libraryName": "snake-case", + "typingsPackageName": "snake-case", + "sourceRepoURL": "https://github.com/blakeembrey/snake-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "soap", + "typingsPackageName": "soap", + "sourceRepoURL": "https://www.npmjs.com/package/soap", + "asOfVersion": "0.21.0" + }, + { + "libraryName": "source-map", + "typingsPackageName": "source-map", + "sourceRepoURL": "https://github.com/mozilla/source-map", + "asOfVersion": "0.5.7" + }, + { + "libraryName": "Spin.js", + "typingsPackageName": "spin.js", + "sourceRepoURL": "http://fgnass.github.com/spin.js/", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "spotify-web-api-js", + "typingsPackageName": "spotify-web-api-js", + "sourceRepoURL": "https://github.com/JMPerez/spotify-web-api-js", + "asOfVersion": "0.21.0" + }, + { + "libraryName": "ServiceStack Utils", + "typingsPackageName": "ss-utils", + "sourceRepoURL": "https://servicestack.net/", + "asOfVersion": "0.1.5" + }, + { + "libraryName": "striptags", + "typingsPackageName": "striptags", + "sourceRepoURL": "https://github.com/ericnorris/striptags", + "asOfVersion": "3.1.1" + }, + { + "libraryName": "Sugar", + "typingsPackageName": "sugar", + "sourceRepoURL": "https://github.com/andrewplummer/Sugar", + "asOfVersion": "2.0.2" + }, + { + "libraryName": "survey-knockout", + "typingsPackageName": "survey-knockout", + "sourceRepoURL": "http://surveyjs.org/", + "asOfVersion": "0.10.0" + }, + { + "libraryName": "svg-pan-zoom", + "typingsPackageName": "svg-pan-zoom", + "sourceRepoURL": "https://github.com/ariutta/svg-pan-zoom", + "asOfVersion": "3.4.0" + }, + { + "libraryName": "svg.js", + "typingsPackageName": "svg.js", + "sourceRepoURL": "http://www.svgjs.com/", + "asOfVersion": "2.3.1" + }, + { + "libraryName": "swap-case", + "typingsPackageName": "swap-case", + "sourceRepoURL": "https://github.com/blakeembrey/swap-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "SweetAlert", + "typingsPackageName": "sweetalert", + "sourceRepoURL": "https://github.com/t4t5/sweetalert/", + "asOfVersion": "2.0.4" + }, + { + "libraryName": "Tabris.js", + "typingsPackageName": "tabris", + "sourceRepoURL": "http://tabrisjs.com", + "asOfVersion": "1.8.0" + }, + { + "libraryName": "tcomb", + "typingsPackageName": "tcomb", + "sourceRepoURL": "http://gcanti.github.io/tcomb/guide/index.html", + "asOfVersion": "2.6.0" + }, + { + "libraryName": "timezonecomplete", + "typingsPackageName": "timezonecomplete", + "sourceRepoURL": "https://github.com/SpiritIT/timezonecomplete", + "asOfVersion": "5.5.0" + }, + { + "libraryName": "title-case", + "typingsPackageName": "title-case", + "sourceRepoURL": "https://github.com/blakeembrey/title-case", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "TsMonad", + "typingsPackageName": "tsmonad", + "sourceRepoURL": "https://github.com/cbowdon/TsMonad", + "asOfVersion": "0.5.0" + }, + { + "libraryName": "tstl", + "typingsPackageName": "tstl", + "sourceRepoURL": "https://github.com/samchon/tstl", + "asOfVersion": "1.5.7" + }, + { + "libraryName": "typed.js", + "typingsPackageName": "typed.js", + "sourceRepoURL": "https://github.com/mattboldt/typed.js", + "asOfVersion": "2.0.9" + }, + { + "libraryName": "TypeScript", + "typingsPackageName": "typescript", + "sourceRepoURL": "https://github.com/Microsoft/TypeScript", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "TypeScript", + "typingsPackageName": "typescript-services", + "sourceRepoURL": "https://github.com/Microsoft/TypeScript", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "uk.co.workingedge.phonegap.plugin.istablet", + "typingsPackageName": "uk.co.workingedge.phonegap.plugin.istablet", + "sourceRepoURL": "https://github.com/dpa99c/phonegap-istablet", + "asOfVersion": "1.1.3" + }, + { + "libraryName": "uk.co.workingedge.phonegap.plugin.launchnavigator", + "typingsPackageName": "uk.co.workingedge.phonegap.plugin.launchnavigator", + "sourceRepoURL": "https://github.com/dpa99c/phonegap-launch-navigator", + "asOfVersion": "4.0.0" + }, + { + "libraryName": "upper-case", + "typingsPackageName": "upper-case", + "sourceRepoURL": "https://github.com/blakeembrey/upper-case", + "asOfVersion": "1.1.3" + }, + { + "libraryName": "upper-case-first", + "typingsPackageName": "upper-case-first", + "sourceRepoURL": "https://github.com/blakeembrey/upper-case-first", + "asOfVersion": "1.1.2" + }, + { + "libraryName": "UUID.js", + "typingsPackageName": "uuidjs", + "sourceRepoURL": "https://github.com/LiosK/UUID.js", + "asOfVersion": "3.6.0" + }, + { + "libraryName": "Validate.js", + "typingsPackageName": "validate.js", + "sourceRepoURL": "https://github.com/ansman/validate.js", + "asOfVersion": "0.11.0" + }, + { + "libraryName": "vso-node-api", + "typingsPackageName": "vso-node-api", + "sourceRepoURL": "https://github.com/Microsoft/vso-node-api", + "asOfVersion": "4.0.0" + }, + { + "libraryName": "vuejs", + "typingsPackageName": "vue", + "sourceRepoURL": "https://github.com/vuejs/vue", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "vue-i18n", + "typingsPackageName": "vue-i18n", + "sourceRepoURL": "https://github.com/kazupon/vue-i18n", + "asOfVersion": "7.0.0" + }, + { + "libraryName": "vue-router", + "typingsPackageName": "vue-router", + "sourceRepoURL": "https://github.com/vuejs/vue-router", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "webcola", + "typingsPackageName": "webcola", + "sourceRepoURL": "https://github.com/tgdwyer/WebCola", + "asOfVersion": "3.2.0" + }, + { + "libraryName": "webgme", + "typingsPackageName": "webgme", + "sourceRepoURL": "https://webgme.org", + "asOfVersion": "2.11.0" + }, + { + "libraryName": "Webix UI", + "typingsPackageName": "webix", + "sourceRepoURL": "http://webix.com", + "asOfVersion": "5.1.1" + }, + { + "libraryName": "winston", + "typingsPackageName": "winston", + "sourceRepoURL": "https://github.com/winstonjs/winston.git", + "asOfVersion": "2.4.4" + }, + { + "libraryName": "wolfy87-eventemitter", + "typingsPackageName": "wolfy87-eventemitter", + "sourceRepoURL": "https://github.com/Wolfy87/EventEmitter", + "asOfVersion": "5.2.0" + }, + { + "libraryName": "wonder-commonlib", + "typingsPackageName": "wonder-commonlib", + "sourceRepoURL": "https://github.com/yyc-git/Wonder-CommonLib", + "asOfVersion": "0.1.12" + }, + { + "libraryName": "wonder-frp", + "typingsPackageName": "wonder-frp", + "sourceRepoURL": "https://github.com/yyc-git/Wonder-FRP", + "asOfVersion": "0.1.25" + }, + { + "libraryName": "x2js", + "typingsPackageName": "x2js", + "sourceRepoURL": "https://code.google.com/p/x2js/", + "asOfVersion": "3.1.0" + }, + { + "libraryName": "xadesjs", + "typingsPackageName": "xadesjs", + "sourceRepoURL": "https://github.com/PeculiarVentures/xadesjs", + "asOfVersion": "2.0.2" + }, + { + "libraryName": "xhr-mock", + "typingsPackageName": "xhr-mock", + "sourceRepoURL": "https://github.com/jameslnewell/xhr-mock#readme", + "asOfVersion": "2.0.0" + }, + { + "libraryName": "xlsx", + "typingsPackageName": "xlsx", + "sourceRepoURL": "https://github.com/sheetjs/js-xlsx", + "asOfVersion": "0.0.36" + }, + { + "libraryName": "xml-js", + "typingsPackageName": "xml-js", + "sourceRepoURL": "https://github.com/nashwaan/xml-js", + "asOfVersion": "1.0.0" + }, + { + "libraryName": "@xmpp/jid", + "typingsPackageName": "xmpp-jid", + "sourceRepoURL": "github.com/node-xmpp/node-xmpp/", + "asOfVersion": "1.2.0" + }, + { + "libraryName": "xterm.js", + "typingsPackageName": "xterm", + "sourceRepoURL": "https://github.com/sourcelair/xterm.js/", + "asOfVersion": "3.0.0" + }, + { + "libraryName": "yFiles for HTML", + "typingsPackageName": "yfiles", + "sourceRepoURL": "none", + "asOfVersion": "2.1.0" + }, + { + "libraryName": "zetapush-js", + "typingsPackageName": "zetapush-js", + "sourceRepoURL": "https://github.com/zetapush/zetapush-js", + "asOfVersion": "3.1.2" + }, + { + "libraryName": "Zone.js", + "typingsPackageName": "zone.js", + "sourceRepoURL": "https://github.com/angular/zone.js", + "asOfVersion": "0.5.12" + } + ] } diff --git a/types/mobx-cookie/index.d.ts b/types/mobx-cookie/index.d.ts deleted file mode 100644 index fbf3cc58fd..0000000000 --- a/types/mobx-cookie/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Type definitions for mobx-cookie 1.1 -// Project: https://github.com/will-stone/mobx-cookie#readme -// Definitions by: Duong Tran -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -import { CookieAttributes } from 'js-cookie'; - -declare class MobxCookie { - constructor(name: string, options?: CookieAttributes); - - get(): any; - set(value: any, options?: CookieAttributes): void; - remove(): void; -} - -export default MobxCookie; diff --git a/types/mobx-cookie/mobx-cookie-tests.ts b/types/mobx-cookie/mobx-cookie-tests.ts deleted file mode 100644 index 66965a9f31..0000000000 --- a/types/mobx-cookie/mobx-cookie-tests.ts +++ /dev/null @@ -1,11 +0,0 @@ -import MobxCookie from 'mobx-cookie'; - -// Declare a reactive mobx cookie that last for 20 days -const mobxCookie = new MobxCookie('TEST_MOBX_COOKIE', {expires: 20}); - -// Set a new value for the cookie that last for 10 days -mobxCookie.set('MY_VALUE', {expires: 10}); - -const cookieValue = mobxCookie.get(); - -mobxCookie.remove(); diff --git a/types/mobx-cookie/tsconfig.json b/types/mobx-cookie/tsconfig.json deleted file mode 100644 index 4222165feb..0000000000 --- a/types/mobx-cookie/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "mobx-cookie-tests.ts" - ] -} diff --git a/types/mobx-cookie/tslint.json b/types/mobx-cookie/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/mobx-cookie/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" } From ce45dc72c04ce322901dc22f81e12f8cb8c51eb1 Mon Sep 17 00:00:00 2001 From: g1eny0ung Date: Fri, 2 Nov 2018 09:32:59 +0800 Subject: [PATCH 0197/1121] Upgrade react-alert to 4.0 --- types/react-alert/index.d.ts | 122 ++++----------------- types/react-alert/react-alert-tests.tsx | 113 +++++++++++++------ types/react-alert/v2/index.d.ts | 110 +++++++++++++++++++ types/react-alert/v2/react-alert-tests.tsx | 48 ++++++++ types/react-alert/v2/tsconfig.json | 27 +++++ types/react-alert/v2/tslint.json | 1 + 6 files changed, 286 insertions(+), 135 deletions(-) create mode 100644 types/react-alert/v2/index.d.ts create mode 100644 types/react-alert/v2/react-alert-tests.tsx create mode 100644 types/react-alert/v2/tsconfig.json create mode 100644 types/react-alert/v2/tslint.json diff --git a/types/react-alert/index.d.ts b/types/react-alert/index.d.ts index 3814b7f29f..cbc48d247f 100644 --- a/types/react-alert/index.d.ts +++ b/types/react-alert/index.d.ts @@ -1,110 +1,34 @@ -// Type definitions for react-alert 2.4 +// Type definitions for react-alert 4.0 // Project: https://github.com/schiehll/react-alert -// Definitions by: Steve Syrell +// Definitions by: Yue Yang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import * as React from "react"; +import * as React from 'react'; -export interface AlertContainerProps { - /** - * The offset of the alert from the page border, can be any number. - * - * Default: 14. - */ - offset: number; +export type AlertPosition = + | 'top left' + | 'top right' + | 'top center' + | 'bottom left' + | 'bottom right' + | 'bottom center'; - /** - * The position of the alert. Can be [bottom left, bottom right, top left, top right]. - * - * Default: 'bottom left' - */ - position: string; +export type AlertType = 'info' | 'success' | 'error'; +export type AlertTransition = 'fade' | 'scale'; - /** - * The color theme of the alert. Can be [dark, light]. - * - * Default: 'dark' - */ - theme: string; - - /** - * The time in milliseconds the alert is displayed. After this - * time ellapses, the alert will close itself. Use 0 to prevent self-closure - * (applies to all alerts). - * - * Default: 5000 - */ - time: number; - - /** - * The transition animation. Can be [scale, fade]. - * - * Default: 'scale' - */ - transition: string; +export interface ProviderProps { + offset?: string; + position?: AlertPosition; + timeout?: number; + type?: AlertType; + transition?: AlertTransition; + zIndex?: number; + template: React.ComponentType; } -export interface AlertShowOptions { - /** - * The time in milliseconds the alert is displayed. After this - * time ellapses, the alert will close itself. Use 0 to prevent self-closure. - */ - time?: number; +export class Provider extends React.Component {} - /** - * The icon to show in the alert. - * - * Default: the icon which matches the type of alert to be shown. - */ - icon?: React.ReactNode; +export const Alert: React.Consumer; - /** - * A callback function that will be called when the alert is closed. - */ - onClose?: () => void; - - /** - * The type of alert to show. This will only be used when calling show(). - * Can be [info, success, error]. - * - * Default: 'info' - */ - type?: string; -} - -export default class AlertContainer extends React.Component { - /** - * Show a success alert. - * @returns The id of the created alert. - */ - success(message: string, options?: AlertShowOptions): string; - - /** - * Show an error alert. - * @returns The id of the created alert. - */ - error(message: string, options?: AlertShowOptions): string; - - /** - * Show an info alert. - * @returns The id of the created alert. - */ - info(message: string, options?: AlertShowOptions): string; - - /** - * Show an alert. - * @returns The id of the created alert. - */ - show(message: string, options?: AlertShowOptions): string; - - /** - * Remove all alerts from the page. - */ - removeAll(): void; - - /** - * Removes the alert with the specified id from the page. - */ - remove(id: string): void; -} +export function withAlert

(c: React.ComponentType

): React.ComponentType

; diff --git a/types/react-alert/react-alert-tests.tsx b/types/react-alert/react-alert-tests.tsx index 84686ea73d..d421d8cc88 100644 --- a/types/react-alert/react-alert-tests.tsx +++ b/types/react-alert/react-alert-tests.tsx @@ -1,48 +1,89 @@ -import * as React from "react"; -import AlertContainer, { AlertContainerProps, AlertShowOptions } from "react-alert"; +import * as React from 'react'; +import { + Provider as AlertProvider, + Alert, + withAlert, + AlertPosition, + AlertTransition +} from 'react-alert'; -export class ReactAlertTest extends React.Component { - private _alert: AlertContainer; +class AppWithoutAlert extends React.Component { render() { - const props: AlertContainerProps = { - offset: 14, - position: "bottom left", - theme: "dark", - time: 5000, - transition: "scale" - }; + return ( + + ); + } +} + +class AppAlert extends React.Component { + render() { + return ( + + {alert => ( + + )} + + ); + } +} + +const App = withAlert(AppWithoutAlert); + +class AlertTemplate extends React.Component { + render() { + // the style contains only the margin given as offset + // options contains all alert given options + // message is the alert message... + // close is a function that closes the alert + const { style, options, message, close } = this.props; return ( -

- this._alert = a as AlertContainer} {...props} /> +
+ {options.type === 'info' && '!'} + {options.type === 'success' && ':)'} + {options.type === 'error' && ':('} + {message} +
); } +} - private _testMethods(): void { - const options: AlertShowOptions = { - time: 5000, - type: "info", - onClose: this._onAlertClosed, - icon: - }; +const options = { + position: 'bottom center' as AlertPosition, + timeout: 5000, + offset: '30px', + transition: 'scale' as AlertTransition +}; - let alertId: string; - alertId = this._alert.show("show without options"); - alertId = this._alert.show("show with options", options); - - alertId = this._alert.error("error without options"); - alertId = this._alert.error("error with options", options); - - alertId = this._alert.info("info without options"); - alertId = this._alert.info("info with options", options); +class Root extends React.Component { + render() { + return ( + + + + ); + } +} - alertId = this._alert.success("success without options"); - alertId = this._alert.success("success with options", options); - - this._alert.remove(alertId); - this._alert.removeAll(); +class RootAlert extends React.Component { + render() { + return ( + + + + ); } - - private _onAlertClosed(): void { } } diff --git a/types/react-alert/v2/index.d.ts b/types/react-alert/v2/index.d.ts new file mode 100644 index 0000000000..3814b7f29f --- /dev/null +++ b/types/react-alert/v2/index.d.ts @@ -0,0 +1,110 @@ +// Type definitions for react-alert 2.4 +// Project: https://github.com/schiehll/react-alert +// Definitions by: Steve Syrell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as React from "react"; + +export interface AlertContainerProps { + /** + * The offset of the alert from the page border, can be any number. + * + * Default: 14. + */ + offset: number; + + /** + * The position of the alert. Can be [bottom left, bottom right, top left, top right]. + * + * Default: 'bottom left' + */ + position: string; + + /** + * The color theme of the alert. Can be [dark, light]. + * + * Default: 'dark' + */ + theme: string; + + /** + * The time in milliseconds the alert is displayed. After this + * time ellapses, the alert will close itself. Use 0 to prevent self-closure + * (applies to all alerts). + * + * Default: 5000 + */ + time: number; + + /** + * The transition animation. Can be [scale, fade]. + * + * Default: 'scale' + */ + transition: string; +} + +export interface AlertShowOptions { + /** + * The time in milliseconds the alert is displayed. After this + * time ellapses, the alert will close itself. Use 0 to prevent self-closure. + */ + time?: number; + + /** + * The icon to show in the alert. + * + * Default: the icon which matches the type of alert to be shown. + */ + icon?: React.ReactNode; + + /** + * A callback function that will be called when the alert is closed. + */ + onClose?: () => void; + + /** + * The type of alert to show. This will only be used when calling show(). + * Can be [info, success, error]. + * + * Default: 'info' + */ + type?: string; +} + +export default class AlertContainer extends React.Component { + /** + * Show a success alert. + * @returns The id of the created alert. + */ + success(message: string, options?: AlertShowOptions): string; + + /** + * Show an error alert. + * @returns The id of the created alert. + */ + error(message: string, options?: AlertShowOptions): string; + + /** + * Show an info alert. + * @returns The id of the created alert. + */ + info(message: string, options?: AlertShowOptions): string; + + /** + * Show an alert. + * @returns The id of the created alert. + */ + show(message: string, options?: AlertShowOptions): string; + + /** + * Remove all alerts from the page. + */ + removeAll(): void; + + /** + * Removes the alert with the specified id from the page. + */ + remove(id: string): void; +} diff --git a/types/react-alert/v2/react-alert-tests.tsx b/types/react-alert/v2/react-alert-tests.tsx new file mode 100644 index 0000000000..84686ea73d --- /dev/null +++ b/types/react-alert/v2/react-alert-tests.tsx @@ -0,0 +1,48 @@ +import * as React from "react"; +import AlertContainer, { AlertContainerProps, AlertShowOptions } from "react-alert"; + +export class ReactAlertTest extends React.Component { + private _alert: AlertContainer; + render() { + const props: AlertContainerProps = { + offset: 14, + position: "bottom left", + theme: "dark", + time: 5000, + transition: "scale" + }; + + return ( +
+ this._alert = a as AlertContainer} {...props} /> +
+ ); + } + + private _testMethods(): void { + const options: AlertShowOptions = { + time: 5000, + type: "info", + onClose: this._onAlertClosed, + icon: + }; + + let alertId: string; + alertId = this._alert.show("show without options"); + alertId = this._alert.show("show with options", options); + + alertId = this._alert.error("error without options"); + alertId = this._alert.error("error with options", options); + + alertId = this._alert.info("info without options"); + alertId = this._alert.info("info with options", options); + + alertId = this._alert.success("success without options"); + alertId = this._alert.success("success with options", options); + + this._alert.remove(alertId); + this._alert.removeAll(); + } + + private _onAlertClosed(): void { } +} diff --git a/types/react-alert/v2/tsconfig.json b/types/react-alert/v2/tsconfig.json new file mode 100644 index 0000000000..47de249c7e --- /dev/null +++ b/types/react-alert/v2/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "react-alert": ["react-alert/v2"] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-alert-tests.tsx" + ] +} diff --git a/types/react-alert/v2/tslint.json b/types/react-alert/v2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-alert/v2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 900bb09091deb44becba6c4cdf38c249331afec6 Mon Sep 17 00:00:00 2001 From: Yuto Suzuki Date: Thu, 1 Nov 2018 22:48:03 +0900 Subject: [PATCH 0198/1121] fix diffArrays option type --- types/diff/diff-tests.ts | 23 +++++++++++++++++++++++ types/diff/index.d.ts | 5 +++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/types/diff/diff-tests.ts b/types/diff/diff-tests.ts index 0dea2a305e..2f640da490 100644 --- a/types/diff/diff-tests.ts +++ b/types/diff/diff-tests.ts @@ -16,6 +16,29 @@ diffArraysResult.forEach(result => { } }); +interface DiffObj { + value: number; +} +const a: DiffObj = {value: 0}; +const b: DiffObj = {value: 1}; +const c: DiffObj = {value: 2}; +const d: DiffObj = {value: 3}; +const arrayOptions: jsdiff.IArrayOptions = { + comparator: (left: DiffObj, right: DiffObj) => { + return left.value === right.value; + } +}; +const diffResult = jsdiff.diffArrays([a, b, c], [a, b, d], arrayOptions); +diffResult.forEach(result => { + if (result.added) { + console.log(`added ${result.value.length} line(s):`, ...result.value); + } else if (result.removed) { + console.log(`removed ${result.value.length} line(s):`, ...result.value); + } else { + console.log(`no changes`); + } +}); + // -------------------------- class LineDiffWithoutWhitespace extends jsdiff.Diff { diff --git a/types/diff/index.d.ts b/types/diff/index.d.ts index 33d337d1b7..760aee4e61 100644 --- a/types/diff/index.d.ts +++ b/types/diff/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/kpdecker/jsdiff // Definitions by: vvakame // szdc +// moc-yuto // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -18,8 +19,8 @@ declare namespace JsDiff { newlineIsToken?: boolean; } - interface IArrayOptions extends IOptions { - comparator?: (left: any, right: any) => number; + interface IArrayOptions { + comparator?: (left: any, right: any) => boolean; } interface IDiffResult { From 92eb59495cfe6583b3ef6514fb1902530dffb27e Mon Sep 17 00:00:00 2001 From: Jeow Li Huan Date: Thu, 1 Nov 2018 23:07:01 +0800 Subject: [PATCH 0199/1121] [postcss-icss-values] Add Typescript definitions. --- types/postcss-icss-values/index.d.ts | 10 ++++++++ types/postcss-icss-values/package.json | 6 +++++ .../postcss-icss-values-tests.ts | 4 ++++ types/postcss-icss-values/tsconfig.json | 23 +++++++++++++++++++ types/postcss-icss-values/tslint.json | 1 + 5 files changed, 44 insertions(+) create mode 100644 types/postcss-icss-values/index.d.ts create mode 100644 types/postcss-icss-values/package.json create mode 100644 types/postcss-icss-values/postcss-icss-values-tests.ts create mode 100644 types/postcss-icss-values/tsconfig.json create mode 100644 types/postcss-icss-values/tslint.json diff --git a/types/postcss-icss-values/index.d.ts b/types/postcss-icss-values/index.d.ts new file mode 100644 index 0000000000..f7133420e8 --- /dev/null +++ b/types/postcss-icss-values/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for postcss-icss-values 2.0 +// Project: https://github.com/css-modules/postcss-icss-values +// Definitions by: Jeow Li Huan +// Definitions: https://github.com/huan086/postcss-plugins-typings +// TypeScript Version: 2.2 + +import { Plugin } from "postcss"; + +declare const values: Plugin<{}>; +export = values; diff --git a/types/postcss-icss-values/package.json b/types/postcss-icss-values/package.json new file mode 100644 index 0000000000..1e1a719545 --- /dev/null +++ b/types/postcss-icss-values/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "postcss": "7.x.x" + } +} diff --git a/types/postcss-icss-values/postcss-icss-values-tests.ts b/types/postcss-icss-values/postcss-icss-values-tests.ts new file mode 100644 index 0000000000..ac63f19aa0 --- /dev/null +++ b/types/postcss-icss-values/postcss-icss-values-tests.ts @@ -0,0 +1,4 @@ +import values = require("postcss-icss-values"); +import { Transformer } from "postcss"; + +const ap1: Transformer = values(); diff --git a/types/postcss-icss-values/tsconfig.json b/types/postcss-icss-values/tsconfig.json new file mode 100644 index 0000000000..354ce66470 --- /dev/null +++ b/types/postcss-icss-values/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "postcss-icss-values-tests.ts" + ] +} diff --git a/types/postcss-icss-values/tslint.json b/types/postcss-icss-values/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/postcss-icss-values/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 269c33056f0746e2603950da4d24b86180fc59da Mon Sep 17 00:00:00 2001 From: taoqf Date: Fri, 2 Nov 2018 11:01:42 +0800 Subject: [PATCH 0200/1121] remove rule `no-any-union` --- types/ali-app/index.d.ts | 10 +++++----- types/ali-app/tslint.json | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/types/ali-app/index.d.ts b/types/ali-app/index.d.ts index 3bdd10f6ef..82f7b2bf27 100644 --- a/types/ali-app/index.d.ts +++ b/types/ali-app/index.d.ts @@ -9,7 +9,7 @@ declare namespace my { // #region 基本参数 interface DataResponse { /** 回调函数返回的内容 */ - data: string | ArrayBuffer | any; + data: any; /** 开发者服务器返回的 HTTP 状态码 */ status: number; /** 开发者服务器返回的 HTTP Response Header */ @@ -1701,7 +1701,7 @@ declare namespace my { /** 本地缓存中的指定的 key */ key: string; /** 需要存储的内容 */ - data: any | string; + data: any; } /** * 将数据存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的数据。 @@ -1716,7 +1716,7 @@ declare namespace my { * @param key 本地缓存中的指定的 key * @param data 需要存储的内容 */ - function setStorageSync(options: { key: string, data: any | string }): void; + function setStorageSync(options: { key: string; data: any; }): void; interface GetStorageOptions extends BaseOptions { /** 本地缓存中的指定的 key */ @@ -1734,7 +1734,7 @@ declare namespace my { * 同步获取缓存数据。 * 这是同步接口 */ - function getStorageSync(options: { key: string; }): any | string; + function getStorageSync(options: { key: string; }): any; interface RemoveStorageOptions extends BaseOptions { key: string; @@ -2005,7 +2005,7 @@ declare namespace my { /** 默认GET,目前支持GET,POST */ method?: "GET" | "POST"; /** 请求的参数 */ - data?: string | ArrayBuffer | any; + data?: any; /** * 超时时间,单位ms,默认30000 */ diff --git a/types/ali-app/tslint.json b/types/ali-app/tslint.json index 22f8814fa9..f491d1bed9 100644 --- a/types/ali-app/tslint.json +++ b/types/ali-app/tslint.json @@ -2,7 +2,6 @@ "extends": "dtslint/dt.json", "rules": { "no-mergeable-namespace": false, - "no-any-union": false, "no-unnecessary-generics": false } } \ No newline at end of file From 4b6578fff9143833d89a754066f498d1aef7d1c3 Mon Sep 17 00:00:00 2001 From: Arjan Jassal Date: Thu, 1 Nov 2018 22:14:59 -0700 Subject: [PATCH 0201/1121] update TS version comment header --- types/styled-theming/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-theming/index.d.ts b/types/styled-theming/index.d.ts index a9147f6e5e..fab32a7617 100644 --- a/types/styled-theming/index.d.ts +++ b/types/styled-theming/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/styled-components/styled-theming#readme // Definitions by: Arjan Jassal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 +// TypeScript Version: 2.7 declare function theme(name: string, values: theme.ThemeMap): theme.ThemeSet; From 42b78d41a11f4b1b93e578025286481ddd819d45 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 2 Nov 2018 02:34:35 -0400 Subject: [PATCH 0202/1121] Update types --- types/react-reconciler/index.d.ts | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/types/react-reconciler/index.d.ts b/types/react-reconciler/index.d.ts index 3aa6a6189e..b303c22d81 100644 --- a/types/react-reconciler/index.d.ts +++ b/types/react-reconciler/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-reconciler 0.15 +// Type definitions for react-reconciler 0.16 // Project: https://reactjs.org/ // Definitions by: Nathan Bierema // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -33,7 +33,11 @@ declare namespace ReactReconciler { // Unique identifier of this child. key: null | string; - // The function/class/module associated with this fiber. + // The value of element.type which is used to preserve the identity during + // reconciliation of this child. + elementType: any, + + // The resolved function/class/ associated with this fiber. type: any; // The local state associated with this fiber. @@ -74,7 +78,7 @@ declare namespace ReactReconciler { firstContextDependency: ContextDependency | null; // Bitfield that describes properties about the fiber and its subtree. E.g. - // the AsyncMode flag indicates whether the subtree should be async-by- + // the ConcurrentMode flag indicates whether the subtree should be async-by- // default. When a fiber is created, it inherits the mode of its // parent. Additional flags can be set at creation time, but after that the // value should remain unchanged throughout the fiber's lifetime, particularly @@ -361,7 +365,7 @@ declare namespace ReactReconciler { ): ExpirationTime; createContainer( containerInfo: Container, - isAsync: boolean, + isConcurrent: boolean, hydrate: boolean, ): OpaqueRoot; updateContainer( @@ -458,10 +462,10 @@ declare namespace ReactReconciler { nextScheduledRoot: FiberRoot | null; } - // The following attributes are only used by interaction tracking builds. + // The following attributes are only used by interaction tracing builds. // They enable interactions to be associated with their async work, // And expose interaction metadata to the React DevTools Profiler plugin. - // Note that these attributes are only defined when the enableSchedulerTracking flag is enabled. + // Note that these attributes are only defined when the enableSchedulerTracing flag is enabled. interface ProfilingOnlyFiberRootProperties { interactionThreadID: number; memoizedInteractions: Set; @@ -473,7 +477,7 @@ declare namespace ReactReconciler { // react-reconciler/ReactFiberScheduler interface Deadline { - timeRemaining: () => number; + timeRemaining(): number; didTimeout: boolean; } @@ -510,7 +514,7 @@ declare namespace ReactReconciler { lastCapturedEffect: Update | null; } - // schedule/Tracking + // scheduler/Tracing interface Interaction { __count: number; @@ -580,7 +584,9 @@ declare namespace ReactReconciler { | 13 | 14 | 15 - | 16; + | 16 + | 17 + | 18; } export = ReactReconciler; From f74d5783e763c6f3235c48f51e3acfd63c3fa518 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 2 Nov 2018 03:56:04 -0400 Subject: [PATCH 0203/1121] Add types for scheduler package --- types/scheduler/index.d.ts | 28 ++++++++++++++++++++++++++++ types/scheduler/scheduler-tests.ts | 8 ++++++++ types/scheduler/tsconfig.json | 23 +++++++++++++++++++++++ types/scheduler/tslint.json | 1 + 4 files changed, 60 insertions(+) create mode 100644 types/scheduler/index.d.ts create mode 100644 types/scheduler/scheduler-tests.ts create mode 100644 types/scheduler/tsconfig.json create mode 100644 types/scheduler/tslint.json diff --git a/types/scheduler/index.d.ts b/types/scheduler/index.d.ts new file mode 100644 index 0000000000..8ed478b8ef --- /dev/null +++ b/types/scheduler/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for scheduler 0.10 +// Project: https://reactjs.org/ +// Definitions by: Nathan Bierema +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Deadline { + timeRemaining(): number; + didTimeout: boolean; +} +export type FrameCallbackType = (deadline: Deadline) => FameCallbackType | undefined; +export interface CallbackNode { + callback: FrameCallbackType; + priorityLevel: number; + expirationTime: number; + next: CallbackNode | null; + prev: CallbackNode | null; +} + +export const unstable_ImmediatePriority = 1; +export const unstable_UserBlockingPriority = 2; +export const unstable_NormalPriority = 3; +export const unstable_IdlePriority = 4; +export function unstable_runWithPriority(priorityLevel: number, eventHandler: () => T): T | undefined; +export function unstable_scheduleCallback(callback: FameCallbackType, deprecated_options?: { timeout: number}): CallbackNode; +export function unstable_cancelCallback(callbackNode: CallbackNode): void; +export function unstable_wrapCallback(callback: FrameCallbackType): () => FrameCallbackType | undefined; +export function unstable_getCurrentPriorityLevel(): number; +export function unstable_now(): number; diff --git a/types/scheduler/scheduler-tests.ts b/types/scheduler/scheduler-tests.ts new file mode 100644 index 0000000000..49baa28e3a --- /dev/null +++ b/types/scheduler/scheduler-tests.ts @@ -0,0 +1,8 @@ +import { unstable_scheduleCallback, unstable_cancelCallback, unstable_now } from 'scheduler'; + +// $ExpectType CallbackNode +const callbackNode = unstable_scheduleCallback(() => 0, { timeout: 100 }); +unstable_cancelCallback(callbackNode); + +// $ExpectType number +unstable_now(); diff --git a/types/scheduler/tsconfig.json b/types/scheduler/tsconfig.json new file mode 100644 index 0000000000..b6c5c6021a --- /dev/null +++ b/types/scheduler/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "scheduler-tests.ts" + ] +} diff --git a/types/scheduler/tslint.json b/types/scheduler/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/scheduler/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a551a533cbf36a366ba8945fc981dd6e881f1ec3 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 2 Nov 2018 03:57:56 -0400 Subject: [PATCH 0204/1121] Fix --- types/react-reconciler/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-reconciler/index.d.ts b/types/react-reconciler/index.d.ts index b303c22d81..733cc10435 100644 --- a/types/react-reconciler/index.d.ts +++ b/types/react-reconciler/index.d.ts @@ -35,7 +35,7 @@ declare namespace ReactReconciler { // The value of element.type which is used to preserve the identity during // reconciliation of this child. - elementType: any, + elementType: any; // The resolved function/class/ associated with this fiber. type: any; From 93cc9ad5d66c32e58183121b327ec2d043a50fb6 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 2 Nov 2018 04:02:07 -0400 Subject: [PATCH 0205/1121] Fix --- types/scheduler/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/scheduler/index.d.ts b/types/scheduler/index.d.ts index 8ed478b8ef..4b85703328 100644 --- a/types/scheduler/index.d.ts +++ b/types/scheduler/index.d.ts @@ -7,7 +7,7 @@ export interface Deadline { timeRemaining(): number; didTimeout: boolean; } -export type FrameCallbackType = (deadline: Deadline) => FameCallbackType | undefined; +export type FrameCallbackType = (deadline: Deadline) => FrameCallbackType | undefined; export interface CallbackNode { callback: FrameCallbackType; priorityLevel: number; @@ -21,7 +21,7 @@ export const unstable_UserBlockingPriority = 2; export const unstable_NormalPriority = 3; export const unstable_IdlePriority = 4; export function unstable_runWithPriority(priorityLevel: number, eventHandler: () => T): T | undefined; -export function unstable_scheduleCallback(callback: FameCallbackType, deprecated_options?: { timeout: number}): CallbackNode; +export function unstable_scheduleCallback(callback: F4ameCallbackType, deprecated_options?: { timeout: number}): CallbackNode; export function unstable_cancelCallback(callbackNode: CallbackNode): void; export function unstable_wrapCallback(callback: FrameCallbackType): () => FrameCallbackType | undefined; export function unstable_getCurrentPriorityLevel(): number; From eba14636591e60f101c6fa209d9f74fb56c966d4 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 2 Nov 2018 04:10:16 -0400 Subject: [PATCH 0206/1121] Fix --- types/scheduler/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/scheduler/index.d.ts b/types/scheduler/index.d.ts index 4b85703328..9ec0f55e0f 100644 --- a/types/scheduler/index.d.ts +++ b/types/scheduler/index.d.ts @@ -21,7 +21,7 @@ export const unstable_UserBlockingPriority = 2; export const unstable_NormalPriority = 3; export const unstable_IdlePriority = 4; export function unstable_runWithPriority(priorityLevel: number, eventHandler: () => T): T | undefined; -export function unstable_scheduleCallback(callback: F4ameCallbackType, deprecated_options?: { timeout: number}): CallbackNode; +export function unstable_scheduleCallback(callback: FrameCallbackType, deprecated_options?: { timeout: number}): CallbackNode; export function unstable_cancelCallback(callbackNode: CallbackNode): void; export function unstable_wrapCallback(callback: FrameCallbackType): () => FrameCallbackType | undefined; export function unstable_getCurrentPriorityLevel(): number; From b3b5429cb3a01895fb2a14960a3740901dc9b527 Mon Sep 17 00:00:00 2001 From: georgeevans1995 Date: Fri, 2 Nov 2018 08:19:10 +0000 Subject: [PATCH 0207/1121] Add openDirection on single date range picker openDirection is missing as a prop for SingleDatePickerShape --- types/react-dates/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/react-dates/index.d.ts b/types/react-dates/index.d.ts index 20739d5918..05058b2ca9 100644 --- a/types/react-dates/index.d.ts +++ b/types/react-dates/index.d.ts @@ -181,6 +181,7 @@ declare namespace ReactDates { ) => string | JSX.Element, orientation?: OrientationShape, anchorDirection?: AnchorDirectionShape, + openDirection?: OpenDirectionShape, horizontalMargin?: number, withPortal?: boolean, withFullScreenPortal?: boolean, From 9ea2436ebf4b06d462e6650e6a35086b17c15639 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Fri, 2 Nov 2018 09:19:32 +0100 Subject: [PATCH 0208/1121] Fix 'expected onespace after colon in property-declaration' --- types/terser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index ea57a27c53..97a3244698 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -96,7 +96,7 @@ export interface MinifyOptions { warnings?: boolean; mangle?: boolean | MangleOptions; output?: OutputOptions; - compress?: boolean | CompressOptions; + compress?: boolean | CompressOptions; nameCache?: {}; } From 951bf36687025b461ed69aef24c16e841853a894 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Fri, 2 Nov 2018 04:21:10 -0400 Subject: [PATCH 0209/1121] Fix --- types/scheduler/index.d.ts | 1 + types/scheduler/scheduler-tests.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/scheduler/index.d.ts b/types/scheduler/index.d.ts index 9ec0f55e0f..66da96e759 100644 --- a/types/scheduler/index.d.ts +++ b/types/scheduler/index.d.ts @@ -2,6 +2,7 @@ // Project: https://reactjs.org/ // Definitions by: Nathan Bierema // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 export interface Deadline { timeRemaining(): number; diff --git a/types/scheduler/scheduler-tests.ts b/types/scheduler/scheduler-tests.ts index 49baa28e3a..84c35fb5b7 100644 --- a/types/scheduler/scheduler-tests.ts +++ b/types/scheduler/scheduler-tests.ts @@ -1,7 +1,7 @@ import { unstable_scheduleCallback, unstable_cancelCallback, unstable_now } from 'scheduler'; // $ExpectType CallbackNode -const callbackNode = unstable_scheduleCallback(() => 0, { timeout: 100 }); +const callbackNode = unstable_scheduleCallback(() => {}, { timeout: 100 }); unstable_cancelCallback(callbackNode); // $ExpectType number From 4ebc65dc5c6f8fda52fabee60c4e057bb35c3746 Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Fri, 2 Nov 2018 09:22:23 +0100 Subject: [PATCH 0210/1121] Remove dtslint compatibility warning --- types/terser/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 97a3244698..7c64a67e34 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: JordiAnderl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 -// No support for typescript version 3. See https://github.com/Microsoft/dtslint/issues/137 import * as MOZ_SourceMap from "source-map"; From a1cdeac2042d131eb0eb0881e4c72590531a00ec Mon Sep 17 00:00:00 2001 From: JordiAnderl Date: Fri, 2 Nov 2018 09:30:52 +0100 Subject: [PATCH 0211/1121] Use literals for Tokenizer types --- types/terser/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/terser/index.d.ts b/types/terser/index.d.ts index 7c64a67e34..44a3e1cdb7 100644 --- a/types/terser/index.d.ts +++ b/types/terser/index.d.ts @@ -9,10 +9,9 @@ import * as MOZ_SourceMap from "source-map"; export interface Tokenizer { /** * The type of this token. - * Can be "num", "string", "regexp", "operator", "punc", "atom", "name", "keyword", "comment1" or "comment2". * "comment1" and "comment2" are for single-line, respectively multi-line comments. */ - type: string; + type: "num" | "string" | "regexp" | "operator" | "punc" | "atom" | "name" | "keyword" | "comment1" | "comment2"; /** * The name of the file where this token originated from. Useful when compressing multiple files at once to generate the proper source map. From 07ed875ab9e816d85d28f5f3c73266f07cc090f2 Mon Sep 17 00:00:00 2001 From: Leo Liang Date: Fri, 2 Nov 2018 16:40:28 +0800 Subject: [PATCH 0212/1121] [request] update agentOptions --- types/request/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/request/index.d.ts b/types/request/index.d.ts index 676156daaa..6a392db78c 100644 --- a/types/request/index.d.ts +++ b/types/request/index.d.ts @@ -134,7 +134,7 @@ declare namespace request { jsonReplacer?: (key: string, value: any) => any; multipart?: RequestPart[] | Multipart; agent?: http.Agent | https.Agent; - agentOptions?: SecureContextOptions; + agentOptions?: http.AgentOptions | https.AgentOptions | SecureContextOptions; agentClass?: any; forever?: any; host?: string; From d84dc622cdd9d29d79e3d76b602813973754699d Mon Sep 17 00:00:00 2001 From: Clark Stevenson Date: Fri, 2 Nov 2018 08:55:14 +0000 Subject: [PATCH 0213/1121] Pixi.js tiny fix - This should be a property, not a function --- types/pixi.js/index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/types/pixi.js/index.d.ts b/types/pixi.js/index.d.ts index 985e1a77c0..7c05701e75 100644 --- a/types/pixi.js/index.d.ts +++ b/types/pixi.js/index.d.ts @@ -377,9 +377,7 @@ declare namespace PIXI { | PIXI.HitArea; buttonMode: boolean; cursor: string; - trackedPointers(): { - [key: number]: interaction.InteractionTrackingData; - }; + trackedPointers: { [key: number]: interaction.InteractionTrackingData; }; // Deprecated defaultCursor: string; // end interactive target @@ -2811,7 +2809,7 @@ declare namespace PIXI { | PIXI.HitArea; buttonMode: boolean; cursor: string; - trackedPointers(): { [key: number]: InteractionTrackingData }; + trackedPointers: { [key: number]: InteractionTrackingData }; // Deprecated defaultCursor: string; From fb73e71ee0eb490a8b5fddabd7b3a5e623f664e5 Mon Sep 17 00:00:00 2001 From: Leo Liang Date: Fri, 2 Nov 2018 17:11:34 +0800 Subject: [PATCH 0214/1121] fix lint error --- types/request/request-tests.ts | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/types/request/request-tests.ts b/types/request/request-tests.ts index c2c377fcbd..0b57137c34 100644 --- a/types/request/request-tests.ts +++ b/types/request/request-tests.ts @@ -626,25 +626,26 @@ request.get('http://10.255.255.1', {timeout: 1500}, (err) => { }); const rand = Math.floor(Math.random() * 100000000).toString(); - request( - { method: 'PUT' - , uri: 'http://mikeal.iriscouch.com/testjs/' + rand - , multipart: - [ { headers: { 'content-type': 'application/json' } - , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, content_type: 'text/plain' }}}) - } - , { body: 'I am an attachment' } - ] + +request( +{ method: 'PUT' +, uri: 'http://mikeal.iriscouch.com/testjs/' + rand +, multipart: + [ { headers: { 'content-type': 'application/json' } + , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, content_type: 'text/plain' }}}) } - , (error, response, body) => { - if (response.statusCode === 201) { - console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand); - } else { - console.log('error: ' + response.statusCode); - console.log(body); - } + , { body: 'I am an attachment' } + ] +} +, (error, response, body) => { + if (response.statusCode === 201) { + console.log('document saved as: http://mikeal.iriscouch.com/testjs/' + rand); + } else { + console.log('error: ' + response.statusCode); + console.log(body); } - ); +} +); request( { method: 'GET' From d595662faa64f611335fc5cf6e487fc87c2a2b2f Mon Sep 17 00:00:00 2001 From: Timur Manyanov Date: Fri, 2 Nov 2018 10:18:08 +0100 Subject: [PATCH 0215/1121] Add makeup-screenreader-trap definitions --- types/makeup-screenreader-trap/index.d.ts | 9 +++++++ .../makeup-screenreader-trap-tests.ts | 9 +++++++ types/makeup-screenreader-trap/tsconfig.json | 24 +++++++++++++++++++ types/makeup-screenreader-trap/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 types/makeup-screenreader-trap/index.d.ts create mode 100644 types/makeup-screenreader-trap/makeup-screenreader-trap-tests.ts create mode 100644 types/makeup-screenreader-trap/tsconfig.json create mode 100644 types/makeup-screenreader-trap/tslint.json diff --git a/types/makeup-screenreader-trap/index.d.ts b/types/makeup-screenreader-trap/index.d.ts new file mode 100644 index 0000000000..0995b62a3c --- /dev/null +++ b/types/makeup-screenreader-trap/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for makeup-screenreader-trap 0.0 +// Project: https://github.com/makeup-js/makeup-screenreader-trap#readme +// Definitions by: Timur Manyanov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +export function trap(el: HTMLElement): void; + +export function untrap(): void; diff --git a/types/makeup-screenreader-trap/makeup-screenreader-trap-tests.ts b/types/makeup-screenreader-trap/makeup-screenreader-trap-tests.ts new file mode 100644 index 0000000000..48b198ab2d --- /dev/null +++ b/types/makeup-screenreader-trap/makeup-screenreader-trap-tests.ts @@ -0,0 +1,9 @@ +import { trap, untrap } from 'makeup-screenreader-trap'; + +const widgetEl: HTMLElement | null = document.querySelector('.expander'); + +if (widgetEl) { + trap(widgetEl); +} + +untrap(); diff --git a/types/makeup-screenreader-trap/tsconfig.json b/types/makeup-screenreader-trap/tsconfig.json new file mode 100644 index 0000000000..08df420e11 --- /dev/null +++ b/types/makeup-screenreader-trap/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "makeup-screenreader-trap-tests.ts" + ] +} diff --git a/types/makeup-screenreader-trap/tslint.json b/types/makeup-screenreader-trap/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/makeup-screenreader-trap/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From acae25e4856e102dcc17548de8165a92bb0aaf98 Mon Sep 17 00:00:00 2001 From: Philipp A Date: Fri, 2 Nov 2018 10:17:35 +0100 Subject: [PATCH 0216/1121] =?UTF-8?q?Switched=20to=20=E2=80=9Crequire=20?= =?UTF-8?q?=3D=E2=80=9D=20style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/markdown-it-anchor/index.d.ts | 6 ++--- .../markdown-it-anchor-tests.ts | 2 +- types/markdown-it-container/index.d.ts | 6 ++--- .../markdown-it-container-tests.ts | 4 ++-- types/markdown-it-lazy-headers/index.d.ts | 2 +- types/markdown-it/index.d.ts | 2 +- types/markdown-it/lib/index.d.ts | 22 +++++++++---------- types/markdown-it/lib/parser_block.d.ts | 6 ++--- types/markdown-it/lib/parser_core.d.ts | 8 +++---- types/markdown-it/lib/parser_inline.d.ts | 8 +++---- types/markdown-it/lib/renderer.d.ts | 6 ++--- types/markdown-it/lib/ruler.d.ts | 6 ++--- .../lib/rules_block/state_block.d.ts | 8 +++---- .../lib/rules_core/state_core.d.ts | 6 ++--- .../lib/rules_inline/state_inline.d.ts | 8 +++---- types/markdown-it/lib/token.d.ts | 2 -- types/markdown-it/markdown-it-tests.ts | 6 ++--- types/prosemirror-markdown/index.d.ts | 2 +- 18 files changed, 46 insertions(+), 64 deletions(-) diff --git a/types/markdown-it-anchor/index.d.ts b/types/markdown-it-anchor/index.d.ts index e0ef0dd9f9..39cb91be45 100644 --- a/types/markdown-it-anchor/index.d.ts +++ b/types/markdown-it-anchor/index.d.ts @@ -4,9 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as MarkdownIt from 'markdown-it'; -import * as Core from 'markdown-it/lib/parser_core'; -import * as Token from 'markdown-it/lib/token'; +import MarkdownIt = require('markdown-it'); +import Core = require('markdown-it/lib/parser_core'); +import Token = require('markdown-it/lib/token'); declare namespace anchor { interface AnchorInfo { diff --git a/types/markdown-it-anchor/markdown-it-anchor-tests.ts b/types/markdown-it-anchor/markdown-it-anchor-tests.ts index 3570ba764b..a9a865a469 100644 --- a/types/markdown-it-anchor/markdown-it-anchor-tests.ts +++ b/types/markdown-it-anchor/markdown-it-anchor-tests.ts @@ -1,4 +1,4 @@ -import * as MarkdownIt from "markdown-it"; +import MarkdownIt = require("markdown-it"); import anchor = require("markdown-it-anchor"); const md = new MarkdownIt(); diff --git a/types/markdown-it-container/index.d.ts b/types/markdown-it-container/index.d.ts index 99c33958c5..2920f38f91 100644 --- a/types/markdown-it-container/index.d.ts +++ b/types/markdown-it-container/index.d.ts @@ -4,9 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as MarkdownIt from 'markdown-it'; -import * as Renderer from 'markdown-it/lib/renderer'; -import * as Token from 'markdown-it/lib/token'; +import MarkdownIt = require('markdown-it'); +import Renderer = require('markdown-it/lib/renderer'); +import Token = require('markdown-it/lib/token'); declare namespace markdownItContainer { interface ContainerOpts { diff --git a/types/markdown-it-container/markdown-it-container-tests.ts b/types/markdown-it-container/markdown-it-container-tests.ts index fcd46b80d9..e6754f82f3 100644 --- a/types/markdown-it-container/markdown-it-container-tests.ts +++ b/types/markdown-it-container/markdown-it-container-tests.ts @@ -1,5 +1,5 @@ -import * as MarkdownIt from "markdown-it"; -import * as Token from "markdown-it/lib/token"; +import MarkdownIt = require("markdown-it"); +import Token = require("markdown-it/lib/token"); import MarkdownItContainer = require("markdown-it-container"); diff --git a/types/markdown-it-lazy-headers/index.d.ts b/types/markdown-it-lazy-headers/index.d.ts index f16c30e651..43ac828764 100644 --- a/types/markdown-it-lazy-headers/index.d.ts +++ b/types/markdown-it-lazy-headers/index.d.ts @@ -4,7 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as MarkdownIt from 'markdown-it'; +import MarkdownIt = require('markdown-it'); declare function lazyheaders(md: MarkdownIt): void; diff --git a/types/markdown-it/index.d.ts b/types/markdown-it/index.d.ts index 296d55f41c..e7d0ffa6e7 100644 --- a/types/markdown-it/index.d.ts +++ b/types/markdown-it/index.d.ts @@ -4,5 +4,5 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as MarkdownIt from "./lib"; +import MarkdownIt = require("./lib"); export = MarkdownIt; diff --git a/types/markdown-it/lib/index.d.ts b/types/markdown-it/lib/index.d.ts index 5360d80b1a..9a9caf37b6 100644 --- a/types/markdown-it/lib/index.d.ts +++ b/types/markdown-it/lib/index.d.ts @@ -1,16 +1,16 @@ import { LinkifyIt } from 'linkify-it' -import * as State from './rules_core/state_core'; -import * as StateBlock from './rules_block/state_block'; -import * as StateInline from './rules_inline/state_inline'; +import State = require('./rules_core/state_core'); +import StateBlock = require('./rules_block/state_block'); +import StateInline = require('./rules_inline/state_inline'); -import * as Core from './parser_core'; -import * as ParserBlock from './parser_block'; -import * as ParserInline from './parser_inline'; +import Core = require('./parser_core'); +import ParserBlock = require('./parser_block'); +import ParserInline = require('./parser_inline'); -import * as Renderer from './renderer'; -import * as Ruler from './ruler'; -import * as Token from './token'; +import Renderer = require('./renderer'); +import Ruler = require('./ruler'); +import Token = require('./token'); export = MarkdownIt; export as namespace markdownit; @@ -61,7 +61,7 @@ interface MarkdownIt { escapeRE(str: string): string; normalizeReference(str: string): string; } - + disable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt; enable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt; set(options: MarkdownIt.Options): MarkdownIt; @@ -97,7 +97,7 @@ declare module MarkdownIt { interface RulerInline extends Ruler {} interface RulerBlock extends Ruler {} - + type TokenRender = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => void; interface Delimiter { diff --git a/types/markdown-it/lib/parser_block.d.ts b/types/markdown-it/lib/parser_block.d.ts index 288a791089..2efc76b858 100644 --- a/types/markdown-it/lib/parser_block.d.ts +++ b/types/markdown-it/lib/parser_block.d.ts @@ -1,5 +1,5 @@ -import * as MarkdownIt from "."; -import * as Token from "./token"; +import MarkdownIt = require("."); +import Token = require("./token"); export = ParserBlock; @@ -7,5 +7,3 @@ declare class ParserBlock { parse(src: string, md: MarkdownIt, env: any, outTokens: Token[]): void; ruler: MarkdownIt.RulerBlock; } - -declare module ParserBlock {} diff --git a/types/markdown-it/lib/parser_core.d.ts b/types/markdown-it/lib/parser_core.d.ts index 42d2759ab0..a6559bdfef 100644 --- a/types/markdown-it/lib/parser_core.d.ts +++ b/types/markdown-it/lib/parser_core.d.ts @@ -1,6 +1,6 @@ -import * as MarkdownIt from "."; -import * as Ruler from "./ruler"; -import * as Token from "./token"; +import MarkdownIt = require("."); +import Ruler = require("./ruler"); +import Token = require("./token"); export = ParserCore; @@ -8,5 +8,3 @@ declare class ParserCore { process(state: any): void; ruler: Ruler; } - -declare module ParserCore {} diff --git a/types/markdown-it/lib/parser_inline.d.ts b/types/markdown-it/lib/parser_inline.d.ts index 1be89e09f1..ad7aa26d93 100644 --- a/types/markdown-it/lib/parser_inline.d.ts +++ b/types/markdown-it/lib/parser_inline.d.ts @@ -1,6 +1,6 @@ -import * as MarkdownIt from "."; -import * as State from "./rules_core/state_core"; -import * as Token from "./token"; +import MarkdownIt = require("."); +import State = require("./rules_core/state_core"); +import Token = require("./token"); export = ParserInline; @@ -11,5 +11,3 @@ declare class ParserInline { ruler: MarkdownIt.RulerInline; ruler2: MarkdownIt.RulerInline; } - -declare module ParserInline {} diff --git a/types/markdown-it/lib/renderer.d.ts b/types/markdown-it/lib/renderer.d.ts index 51125309e6..0231dad0f9 100644 --- a/types/markdown-it/lib/renderer.d.ts +++ b/types/markdown-it/lib/renderer.d.ts @@ -1,5 +1,5 @@ -import * as MarkdownIt from "."; -import * as Token from "./token"; +import MarkdownIt = require("."); +import Token = require("./token"); export = Renderer; @@ -10,5 +10,3 @@ declare class Renderer { renderInline(tokens: Token[], options: any, env: any): string; renderToken(tokens: Token[], idx: number, options: any): string; } - -declare module Renderer {} diff --git a/types/markdown-it/lib/ruler.d.ts b/types/markdown-it/lib/ruler.d.ts index 106a3d1d72..62ab55e3de 100644 --- a/types/markdown-it/lib/ruler.d.ts +++ b/types/markdown-it/lib/ruler.d.ts @@ -1,5 +1,5 @@ -import * as MarkdownIt from "."; -import * as State from "./rules_core/state_core"; +import MarkdownIt = require("."); +import State = require("./rules_core/state_core"); export = Ruler; @@ -13,5 +13,3 @@ declare class Ruler { getRules(chain: string): MarkdownIt.Rule[]; push(ruleName: string, rule: MarkdownIt.Rule, options?: any): void; } - -declare module Ruler {} diff --git a/types/markdown-it/lib/rules_block/state_block.d.ts b/types/markdown-it/lib/rules_block/state_block.d.ts index e1dc5a2fbd..6eebab4202 100644 --- a/types/markdown-it/lib/rules_block/state_block.d.ts +++ b/types/markdown-it/lib/rules_block/state_block.d.ts @@ -1,6 +1,6 @@ -import * as MarkdownIt from ".."; -import * as State from "../rules_core/state_core"; -import * as Token from "../token"; +import MarkdownIt = require(".."); +import State = require("../rules_core/state_core"); +import Token = require("../token"); export = StateBlock; @@ -21,5 +21,3 @@ declare class StateBlock extends State { lineMax: number; tight: boolean; } - -declare module StateBlock {} diff --git a/types/markdown-it/lib/rules_core/state_core.d.ts b/types/markdown-it/lib/rules_core/state_core.d.ts index dc0eb54921..7cf73134aa 100644 --- a/types/markdown-it/lib/rules_core/state_core.d.ts +++ b/types/markdown-it/lib/rules_core/state_core.d.ts @@ -1,5 +1,5 @@ -import * as MarkdownIt from ".."; -import * as Token from "../token"; +import MarkdownIt = require(".."); +import Token = require("../token"); export = StateCore; @@ -18,5 +18,3 @@ declare class StateCore { /** Return any for a yet untyped property */ [undocumented: string]: any; } - -declare module StateCore {} diff --git a/types/markdown-it/lib/rules_inline/state_inline.d.ts b/types/markdown-it/lib/rules_inline/state_inline.d.ts index eaa1feaa00..27938d99da 100644 --- a/types/markdown-it/lib/rules_inline/state_inline.d.ts +++ b/types/markdown-it/lib/rules_inline/state_inline.d.ts @@ -1,6 +1,6 @@ -import * as MarkdownIt from ".."; -import * as State from "../rules_core/state_core"; -import * as Token from "../token"; +import MarkdownIt = require(".."); +import State = require("../rules_core/state_core"); +import Token = require("../token"); export = StateInline; @@ -44,5 +44,3 @@ declare class StateInline extends State { length: number }; } - -declare module StateInline {} diff --git a/types/markdown-it/lib/token.d.ts b/types/markdown-it/lib/token.d.ts index 142b59289b..1f71d54bfd 100644 --- a/types/markdown-it/lib/token.d.ts +++ b/types/markdown-it/lib/token.d.ts @@ -21,5 +21,3 @@ declare class Token { tag: string; type: string; } - -declare module Token {} diff --git a/types/markdown-it/markdown-it-tests.ts b/types/markdown-it/markdown-it-tests.ts index 3cb1a9ea3b..343661ad87 100644 --- a/types/markdown-it/markdown-it-tests.ts +++ b/types/markdown-it/markdown-it-tests.ts @@ -1,6 +1,6 @@ -import * as MarkdownIt from "markdown-it"; -import * as Renderer from "markdown-it/lib/renderer"; -import * as Token from "markdown-it/lib/token"; +import MarkdownIt = require("markdown-it"); +import Renderer = require("markdown-it/lib/renderer"); +import Token = require("markdown-it/lib/token"); { const md = new MarkdownIt(); diff --git a/types/prosemirror-markdown/index.d.ts b/types/prosemirror-markdown/index.d.ts index 7d18611513..91b37ea51e 100644 --- a/types/prosemirror-markdown/index.d.ts +++ b/types/prosemirror-markdown/index.d.ts @@ -7,7 +7,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -import * as MarkdownIt from 'markdown-it'; +import MarkdownIt = require('markdown-it'); import { Node as ProsemirrorNode, Schema } from 'prosemirror-model'; /** From 1e50bf2d44a6cc7513235c651f555192c45a9f4e Mon Sep 17 00:00:00 2001 From: Julian Strecker Date: Fri, 2 Nov 2018 10:26:41 +0100 Subject: [PATCH 0217/1121] Add screenSpacePanning to OrbitControls which should be there since https://github.com/mrdoob/three.js/commit/312e1b0cd29a859cb81964fcb68b31c3c0ee0914 --- types/three/index.d.ts | 1 + types/three/three-orbitcontrols.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/three/index.d.ts b/types/three/index.d.ts index 74ce9ac0ee..6530be5757 100644 --- a/types/three/index.d.ts +++ b/types/three/index.d.ts @@ -21,6 +21,7 @@ // Ethan Kay , // Methuselah96 // Dilip Ramirez +// Julian Strecker // Definitions: https://github.com//DefinitelyTyped // TypeScript Version: 2.8 diff --git a/types/three/three-orbitcontrols.d.ts b/types/three/three-orbitcontrols.d.ts index 1d4979217f..6d8627c6ad 100644 --- a/types/three/three-orbitcontrols.d.ts +++ b/types/three/three-orbitcontrols.d.ts @@ -32,6 +32,7 @@ export class OrbitControls { mouseButtons: {ORBIT: MOUSE; ZOOM: MOUSE; PAN: MOUSE;}; enableDamping: boolean; dampingFactor: number; + screenSpacePanning: boolean; rotateLeft(angle?: number): void; From 0497f538b0c8314e59dfa9bfcbe5b7fc858c8c5f Mon Sep 17 00:00:00 2001 From: Alexandre Ferrando Date: Wed, 31 Oct 2018 16:33:08 +0100 Subject: [PATCH 0218/1121] Add final function to pino --- types/pino/index.d.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index 4392d09ae9..9d75ec6f6e 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -98,6 +98,23 @@ declare namespace P { */ function extreme(fileDescriptor?: string | number): SonicBoom; + /** + * The pino.final method can be used to create an exit listener function. + * This listener function can be supplied to process exit events. + * The exit listener function will cal the handler with + * @param [logger]: pino logger that serves as reference for the final logger + * @param [handler]: Function that will be called by the handler returned from this function + * @returns Exit listener function that can be supplied to process exit events and will call the supplied handler function + */ + function final(logger: Logger, handler: (error: Error, finalLogger: Logger, ...args: any[]) => void): (error: Error | null, ...args: any[]) => void; + + /** + * The pino.final method can be used to acquire a final logger instance that synchronously flushes on every write. + * @param [logger]: pino logger that serves as reference for the final logger + * @returns Final, synchronous logger + */ + function final(logger: Logger): Logger; + interface LevelMapping { /** * Returns the mappings of level names to their respective internal number representation. From b7b0fb1949ba158077ec6774c04336e6a839810d Mon Sep 17 00:00:00 2001 From: Alexandre Ferrando Date: Wed, 31 Oct 2018 17:04:11 +0100 Subject: [PATCH 0219/1121] Add tests for pino.final --- types/pino/pino-tests.ts | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/types/pino/pino-tests.ts b/types/pino/pino-tests.ts index 609cac121f..c85f2f6873 100644 --- a/types/pino/pino-tests.ts +++ b/types/pino/pino-tests.ts @@ -7,9 +7,9 @@ const error = log.error; info('hello world'); error('this is at error level'); info('the answer is %d', 42); -info({obj: 42}, 'hello world'); -info({obj: 42, b: 2}, 'hello world'); -info({obj: {aa: 'bbb'}}, 'another'); +info({ obj: 42 }, 'hello world'); +info({ obj: 42, b: 2 }, 'hello world'); +info({ obj: { aa: 'bbb' } }, 'another'); setImmediate(info, 'after setImmediate'); error(new Error('an error')); @@ -41,27 +41,27 @@ pino({ }); pino({ base: null }); -pino({ base: { foo: 'bar' } , changeLevelName: 'severity' }); +pino({ base: { foo: 'bar' }, changeLevelName: 'severity' }); if ('pino' in log) console.log(`pino version: ${log.pino}`); -log.child({a: 'property'}).info('hello child!'); +log.child({ a: 'property' }).info('hello child!'); log.level = 'error'; log.info('nope'); -const child = log.child({foo: 'bar'}); +const child = log.child({ foo: 'bar' }); child.info('nope again'); child.level = 'info'; child.info('hooray'); log.info('nope nope nope'); -log.child({foo: 'bar', level: 'debug'}).debug('debug!'); +log.child({ foo: 'bar', level: 'debug' }).debug('debug!'); const customSerializers = { test() { return 'this is my serializer'; } }; -pino().child({serializers: customSerializers}).info({test: 'should not show up'}); -const child2 = log.child({father: true}); -const childChild = child2.child({baby: true}); +pino().child({ serializers: customSerializers }).info({ test: 'should not show up' }); +const child2 = log.child({ father: true }); +const childChild = child2.child({ baby: true }); log.level = 'info'; if (log.levelVal === 30) { @@ -91,3 +91,14 @@ logstderr.error('on stderr instead of stdout'); log.useLevelLabels = true; log.info('lol'); log.level === 'info'; + +const extremeDest = pino.extreme(); +const logExtreme = pino(extremeDest); + +const handler = pino.final(logExtreme, (err: Error, finalLogger: pino.BaseLogger) => { + if (err) { + finalLogger.error(err, 'error caused exit'); + } +}); + +handler(new Error('error')); From a166be0294b608c61a2e6f351c9a4522a29038fb Mon Sep 17 00:00:00 2001 From: Benjamin Kniffler Date: Fri, 2 Nov 2018 11:14:28 +0100 Subject: [PATCH 0220/1121] Reach router div props --- types/reach__router/index.d.ts | 4 +++- types/reach__router/reach__router-tests.tsx | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/types/reach__router/index.d.ts b/types/reach__router/index.d.ts index 60b1c6253e..ed3a6ff649 100644 --- a/types/reach__router/index.d.ts +++ b/types/reach__router/index.d.ts @@ -24,7 +24,9 @@ export interface History { navigate: NavigateFn; } -export class Router extends React.Component { } +export class Router extends React.Component< + RouterProps & React.HTMLProps +> {} export interface RouterProps { basepath?: string; diff --git a/types/reach__router/reach__router-tests.tsx b/types/reach__router/reach__router-tests.tsx index d279547fd2..a64e1ae70d 100644 --- a/types/reach__router/reach__router-tests.tsx +++ b/types/reach__router/reach__router-tests.tsx @@ -4,9 +4,9 @@ import { RouteComponentProps, Router, Redirect -} from "@reach/router"; -import * as React from "react"; -import { render } from "react-dom"; +} from '@reach/router'; +import * as React from 'react'; +import { render } from 'react-dom'; interface DashParams { id: string; @@ -21,7 +21,7 @@ const Dash = (props: RouteComponentProps) => ( const NotFound = (props: RouteComponentProps) =>
Route not found
; render( - + @@ -33,18 +33,18 @@ render( - + {context => ( <>
hostname is {context.location.hostname}
- )}
, - document.getElementById("app-root") + document.getElementById('app-root') ); From 8dbcd9164aca691ace21ec93eb5a52ab409df12f Mon Sep 17 00:00:00 2001 From: Alexandre Ferrando Date: Fri, 2 Nov 2018 11:19:26 +0100 Subject: [PATCH 0221/1121] Address import/require inconsistencies in pino and sonic-boom --- types/pino/index.d.ts | 2 +- types/sonic-boom/index.d.ts | 4 +--- types/sonic-boom/sonic-boom-tests.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index 9d75ec6f6e..39cd2c099f 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -13,7 +13,7 @@ import * as stream from 'stream'; import * as http from 'http'; import { EventEmitter } from 'events'; -import SonicBoom = require('sonic-boom'); +import SonicBoom from 'sonic-boom'; export = P; diff --git a/types/sonic-boom/index.d.ts b/types/sonic-boom/index.d.ts index 292770bd0d..5fd4209b77 100644 --- a/types/sonic-boom/index.d.ts +++ b/types/sonic-boom/index.d.ts @@ -7,9 +7,7 @@ import { EventEmitter } from 'events'; -export = SonicBoom; - -declare class SonicBoom extends EventEmitter { +export default class SonicBoom extends EventEmitter { /** * @param [fileDescriptor] File path or numerical file descriptor * relative protocol is enabled. Default: process.stdout diff --git a/types/sonic-boom/sonic-boom-tests.ts b/types/sonic-boom/sonic-boom-tests.ts index a3beb06d0c..e74f991421 100644 --- a/types/sonic-boom/sonic-boom-tests.ts +++ b/types/sonic-boom/sonic-boom-tests.ts @@ -1,4 +1,4 @@ -import SonicBoom = require('sonic-boom'); +import SonicBoom from 'sonic-boom'; const sonic = new SonicBoom(1); sonic.write('hello sonic\n'); From 7a8020b83a4b60ca3a8d8b2abbaba5c74052838a Mon Sep 17 00:00:00 2001 From: Will Soto Date: Fri, 2 Nov 2018 07:42:21 -0400 Subject: [PATCH 0222/1121] Enable tslint for knex Signed-off-by: Will Soto --- types/knex/tslint.json | 75 +----------------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/types/knex/tslint.json b/types/knex/tslint.json index d84fe24e60..f93cf8562a 100644 --- a/types/knex/tslint.json +++ b/types/knex/tslint.json @@ -1,76 +1,3 @@ { - "extends": "dtslint/dt.json", - "rules": { - "adjacent-overload-signatures": false, - "array-type": false, - "arrow-return-shorthand": false, - "ban-types": false, - "callable-types": false, - "comment-format": false, - "dt-header": false, - "eofline": false, - "export-just-namespace": false, - "import-spacing": false, - "interface-name": false, - "interface-over-type-literal": false, - "jsdoc-format": false, - "max-line-length": false, - "member-access": false, - "new-parens": false, - "no-any-union": false, - "no-boolean-literal-compare": false, - "no-conditional-assignment": false, - "no-consecutive-blank-lines": false, - "no-construct": false, - "no-declare-current-package": false, - "no-duplicate-imports": false, - "no-duplicate-variable": false, - "no-empty-interface": false, - "no-for-in-array": false, - "no-inferrable-types": false, - "no-internal-module": false, - "no-irregular-whitespace": false, - "no-mergeable-namespace": false, - "no-misused-new": false, - "no-namespace": false, - "no-object-literal-type-assertion": false, - "no-padding": false, - "no-redundant-jsdoc": false, - "no-redundant-jsdoc-2": false, - "no-redundant-undefined": false, - "no-reference-import": false, - "no-relative-import-in-test": false, - "no-self-import": false, - "no-single-declare-module": false, - "no-string-throw": false, - "no-unnecessary-callback-wrapper": false, - "no-unnecessary-class": false, - "no-unnecessary-generics": false, - "no-unnecessary-qualifier": false, - "no-unnecessary-type-assertion": false, - "no-useless-files": false, - "no-var-keyword": false, - "no-var": false, - "no-var-requires": false, - "no-void-expression": false, - "no-trailing-whitespace": false, - "object-literal-key-quotes": false, - "object-literal-shorthand": false, - "one-line": false, - "one-variable-per-declaration": false, - "only-arrow-functions": false, - "prefer-conditional-expression": false, - "prefer-const": false, - "prefer-declare-function": false, - "prefer-for-of": false, - "prefer-method-signature": false, - "prefer-template": false, - "radix": false, - "space-before-function-paren": false, - "space-within-parens": false, - "strict-export-declare-modifiers": false, - "trim-file": false, - "triple-equals": false, - "unified-signatures": false - } + "extends": "dtslint/dt.json" } From 5137b6b3631c4c6734a1a61827296a4ce1b9215d Mon Sep 17 00:00:00 2001 From: Alexandre Ferrando Date: Fri, 2 Nov 2018 13:40:45 +0100 Subject: [PATCH 0223/1121] Pino and sonic-boom imports should be CommonJS --- types/pino/index.d.ts | 8 ++++---- types/sonic-boom/index.d.ts | 4 +++- types/sonic-boom/sonic-boom-tests.ts | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index 39cd2c099f..fed6c45253 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -10,10 +10,10 @@ /// -import * as stream from 'stream'; -import * as http from 'http'; -import { EventEmitter } from 'events'; -import SonicBoom from 'sonic-boom'; +import stream = require('stream'); +import http = require('http'); +import EventEmitter = require('events'); +import SonicBoom = require('sonic-boom'); export = P; diff --git a/types/sonic-boom/index.d.ts b/types/sonic-boom/index.d.ts index 5fd4209b77..292770bd0d 100644 --- a/types/sonic-boom/index.d.ts +++ b/types/sonic-boom/index.d.ts @@ -7,7 +7,9 @@ import { EventEmitter } from 'events'; -export default class SonicBoom extends EventEmitter { +export = SonicBoom; + +declare class SonicBoom extends EventEmitter { /** * @param [fileDescriptor] File path or numerical file descriptor * relative protocol is enabled. Default: process.stdout diff --git a/types/sonic-boom/sonic-boom-tests.ts b/types/sonic-boom/sonic-boom-tests.ts index e74f991421..a3beb06d0c 100644 --- a/types/sonic-boom/sonic-boom-tests.ts +++ b/types/sonic-boom/sonic-boom-tests.ts @@ -1,4 +1,4 @@ -import SonicBoom from 'sonic-boom'; +import SonicBoom = require('sonic-boom'); const sonic = new SonicBoom(1); sonic.write('hello sonic\n'); From 6f37c19a96b65fdb5c614d9236fd89536a63d197 Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Fri, 2 Nov 2018 16:01:31 +0100 Subject: [PATCH 0224/1121] [@commercetools/enzyme-extensions] Add types --- ...commercetools__enzyme-extensions-tests.tsx | 30 +++++++++++++++++++ .../index.d.ts | 22 ++++++++++++++ .../tsconfig.json | 27 +++++++++++++++++ .../tslint.json | 1 + 4 files changed, 80 insertions(+) create mode 100644 types/commercetools__enzyme-extensions/commercetools__enzyme-extensions-tests.tsx create mode 100644 types/commercetools__enzyme-extensions/index.d.ts create mode 100644 types/commercetools__enzyme-extensions/tsconfig.json create mode 100644 types/commercetools__enzyme-extensions/tslint.json diff --git a/types/commercetools__enzyme-extensions/commercetools__enzyme-extensions-tests.tsx b/types/commercetools__enzyme-extensions/commercetools__enzyme-extensions-tests.tsx new file mode 100644 index 0000000000..bceab689e7 --- /dev/null +++ b/types/commercetools__enzyme-extensions/commercetools__enzyme-extensions-tests.tsx @@ -0,0 +1,30 @@ +import React = require('react'); +import enzyme = require('enzyme'); +import configureExtensions = require('@commercetools/enzyme-extensions'); + +configureExtensions(enzyme.ShallowWrapper); + +function App() { + return 'Hello world'} />; +} + +interface ChildProps { + cb: () => string; +} + +function Child(props: ChildProps) { + return
{props.cb()}
; +} + +enzyme.shallow() + .find(App) + .renderProp('render'); +enzyme.shallow() + .find(Child) + .renderProp('render', 1, 2); + +enzyme.shallow() + .find(Child) + .drill(props => props.cb()); + +enzyme.shallow().until(Child); diff --git a/types/commercetools__enzyme-extensions/index.d.ts b/types/commercetools__enzyme-extensions/index.d.ts new file mode 100644 index 0000000000..7c009f8e95 --- /dev/null +++ b/types/commercetools__enzyme-extensions/index.d.ts @@ -0,0 +1,22 @@ +// Type definitions for @commercetools/enzyme-extensions 3.0 +// Project: https://github.com/commercetools/enzyme-extensions +// Definitions by: Christian Rackerseder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as enzyme from 'enzyme'; + +declare module 'enzyme' { + interface UntilOptions { + maxDepth: number; + } + interface ShallowWrapper

{ + renderProp(propName: string, ...args: any[]): ShallowWrapper

; + drill(expander: (props: any) => ShallowWrapper): ShallowWrapper

; + until(selector: EnzymeSelector, options?: UntilOptions): ShallowWrapper

; + } +} + +declare function monkeyPatchShallowWrapper(s: typeof enzyme.ShallowWrapper): void; + +export = monkeyPatchShallowWrapper; diff --git a/types/commercetools__enzyme-extensions/tsconfig.json b/types/commercetools__enzyme-extensions/tsconfig.json new file mode 100644 index 0000000000..9e6d70239e --- /dev/null +++ b/types/commercetools__enzyme-extensions/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "paths": { + "@commercetools/enzyme-extensions": ["commercetools__enzyme-extensions"] + } + }, + "files": [ + "index.d.ts", + "commercetools__enzyme-extensions-tests.tsx" + ] +} diff --git a/types/commercetools__enzyme-extensions/tslint.json b/types/commercetools__enzyme-extensions/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/commercetools__enzyme-extensions/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 6448efea6b05d28d3f77f36c7c9e161af18788ea Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 31 Oct 2018 16:40:37 -0600 Subject: [PATCH 0225/1121] =?UTF-8?q?feat:=20support=20WeakMap=E2=80=99s?= =?UTF-8?q?=20in=20lodash=20memoize.Cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/lodash/common/common.d.ts | 8 ++++---- types/lodash/lodash-tests.ts | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/types/lodash/common/common.d.ts b/types/lodash/common/common.d.ts index 864450b1bd..554fe76668 100644 --- a/types/lodash/common/common.d.ts +++ b/types/lodash/common/common.d.ts @@ -127,21 +127,21 @@ declare module "../index" { * @param key The key of the value to remove. * @return Returns `true` if the entry was removed successfully, else `false`. */ - delete(key: string): boolean; + delete(key: any): boolean; /** * Gets the cached value for `key`. * @param key The key of the value to get. * @return Returns the cached value. */ - get(key: string): any; + get(key: any): any; /** * Checks if a cached value for `key` exists. * @param key The key of the entry to check. * @return Returns `true` if an entry for `key` exists, else `false`. */ - has(key: string): boolean; + has(key: any): boolean; /** * Sets `value` to `key` of the cache. @@ -154,7 +154,7 @@ declare module "../index" { /** * Removes all key-value entries from the map. */ - clear(): void; + clear?: () => void; } interface MapCacheConstructor { new (): MapCache; diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 0515136714..3ce044165a 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -3484,6 +3484,11 @@ fp.now(); // $ExpectType number // $ExpectType MapCache new _.memoize.Cache(); + _.memoize.Cache = WeakMap; + _.memoize.Cache = Map; + const memoizedFn = _.memoize(memoizeFn); + memoizedFn.cache = new WeakMap(); + memoizedFn.cache = new Map(); } // _.overArgs From 5e8e4d298b0ea95035883a823b95cc6ddece065d Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Fri, 2 Nov 2018 10:00:28 -0600 Subject: [PATCH 0226/1121] fix: patch bug in Typescript 2.9 version of WeakMap --- types/lodash/common/common.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/common/common.d.ts b/types/lodash/common/common.d.ts index 554fe76668..cbfc534652 100644 --- a/types/lodash/common/common.d.ts +++ b/types/lodash/common/common.d.ts @@ -149,7 +149,7 @@ declare module "../index" { * @param value The value to cache. * @return Returns the cache object. */ - set(key: string, value: any): Dictionary; + set(key: any, value: any): Dictionary; /** * Removes all key-value entries from the map. From 5503f4a7995d17f8de8dd6eb470414637a33108a Mon Sep 17 00:00:00 2001 From: Yipeng Zhao Date: Sat, 3 Nov 2018 01:40:39 +0800 Subject: [PATCH 0227/1121] [@types/react-infinite-scroller]update props getScrollParent --- types/react-infinite-scroller/index.d.ts | 7 ++++++- .../react-infinite-scroller-tests.tsx | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/types/react-infinite-scroller/index.d.ts b/types/react-infinite-scroller/index.d.ts index 12388231ce..f0af24ac5e 100644 --- a/types/react-infinite-scroller/index.d.ts +++ b/types/react-infinite-scroller/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for react-infinite-scroller 1.0 +// Type definitions for react-infinite-scroller 1.2 // Project: https://github.com/CassetteRocks/react-infinite-scroller // Definitions by: Lauri Lavanti , // Piotr Srebniak // Brett Miller +// Yipeng Zhao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -62,6 +63,10 @@ declare namespace InfiniteScroll { * Loader component for indicating "loading more". */ loader?: React.ReactElement; + /** + * Override method to return a different scroll listener if it's not the immediate parent of InfiniteScroll. + */ + getScrollParent?(): HTMLElement | null; } class InfiniteScroll extends React.Component { getParentElement(elem?: HTMLElement | null): HTMLElement | undefined | null; diff --git a/types/react-infinite-scroller/react-infinite-scroller-tests.tsx b/types/react-infinite-scroller/react-infinite-scroller-tests.tsx index 8f08d576e6..eeb2214826 100644 --- a/types/react-infinite-scroller/react-infinite-scroller-tests.tsx +++ b/types/react-infinite-scroller/react-infinite-scroller-tests.tsx @@ -27,12 +27,29 @@ class Test2 extends React.Component { useCapture useWindow={false} > -

Test 1
+
Test 2
); } } +class Test3 extends React.Component { + inputRef = React.createRef(); + + render() { + return ( +
+ {}} + getScrollParent={() => this.inputRef.current} + > +
Test 3
+
+
+ ); + } +} + class InfiniteScrollOverride extends InfiniteScroll { getParentElement(el: HTMLElement) { if (document.getElementById("scroll-header")) { From dfa10e28bb1f983dd0ef84baf0de9f2d9f6e9dc4 Mon Sep 17 00:00:00 2001 From: Frithjof Winkelmann Date: Fri, 2 Nov 2018 18:53:37 +0100 Subject: [PATCH 0228/1121] Enable esModuleInterop in rc-time-picker --- types/rc-time-picker/index.d.ts | 6 +++--- types/rc-time-picker/rc-time-picker-tests.tsx | 2 +- types/rc-time-picker/tsconfig.json | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/types/rc-time-picker/index.d.ts b/types/rc-time-picker/index.d.ts index 79d3f2b89a..62f6a7711a 100644 --- a/types/rc-time-picker/index.d.ts +++ b/types/rc-time-picker/index.d.ts @@ -7,8 +7,6 @@ import * as moment from "moment"; import * as React from 'react'; -export {}; - interface TimePickerProps { prefixCls: string; clearText: string; @@ -46,9 +44,11 @@ interface TimePickerProps { clearIcon: React.ReactNode; } -export default class TimePicker extends React.Component> { +declare class TimePicker extends React.Component> { constructor(props: Readonly>) close(): void; isAM(): boolean; } + +export = TimePicker; diff --git a/types/rc-time-picker/rc-time-picker-tests.tsx b/types/rc-time-picker/rc-time-picker-tests.tsx index 9717e21038..7f0ea63e9c 100644 --- a/types/rc-time-picker/rc-time-picker-tests.tsx +++ b/types/rc-time-picker/rc-time-picker-tests.tsx @@ -1,6 +1,6 @@ import TimePicker from 'rc-time-picker'; import * as React from 'react'; -import * as moment from 'moment'; +import moment from 'moment'; Date: Fri, 2 Nov 2018 11:52:21 -0700 Subject: [PATCH 0229/1121] Add error code 12009 for Office.UI.dislayDialogAsync method. --- types/office-js/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 105062a56e..26631c8c1d 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1035,6 +1035,10 @@ declare namespace Office { * 12007 * A dialog box is already opened from the task pane. A task pane add-in can only have one dialog box open at a time. * + * + * 12009 + * The user chose to ignore the dialog box. This error can occur in online versions of Office, where users may choose not to allow an add-in to present a dialog. + * * * * In the callback function passed to the displayDialogAsync method, you can use the properties of the AsyncResult object to return the From 1d5090a739f57727e54b11976d2a43db9523692d Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 16:16:07 -0400 Subject: [PATCH 0230/1121] [prompts] infer answers types ``` const answers = await prompts({ name: "hello" }) answers.asdf // error answers.name // good ``` --- types/prompts/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 152d6326e8..498a6b0c33 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -6,7 +6,7 @@ export = prompts; -declare function prompts(questions: prompts.PromptObject | prompts.PromptObject[], options?: prompts.Options): any; +declare function prompts(questions: prompts.PromptObject | prompts.PromptObject[], options?: prompts.Options): prompts.Answers; declare namespace prompts { // Circular reference from prompts @@ -51,9 +51,9 @@ declare namespace prompts { onCancel: (prompt: PromptObject, answers: any) => void; } - interface PromptObject { + interface PromptObject { type: string | ((prev: any, values: any, prompt: PromptObject) => void); - name: string | ((prev: any, values: any, prompt: PromptObject) => void); + name: T | ((prev: any, values: any, prompt: PromptObject) => void); message?: string | ((prev: any, values: any, prompt: PromptObject) => void); initial?: string; style?: string; @@ -73,4 +73,6 @@ declare namespace prompts { suggest?: ((prev: any, values: any, prompt: PromptObject) => void); limit?: number; } + + type Answers = { [id in T]: string }; } From 0933324489d2b4368bb955ec1696d16b9eecdf21 Mon Sep 17 00:00:00 2001 From: Evan Cameron Date: Fri, 2 Nov 2018 16:21:36 -0400 Subject: [PATCH 0231/1121] Add lzma-native types --- types/lzma-native/index.d.ts | 130 +++++++++++++++++++++++++ types/lzma-native/lzma-native-tests.ts | 55 +++++++++++ types/lzma-native/tsconfig.json | 13 +++ types/lzma-native/tslint.json | 1 + 4 files changed, 199 insertions(+) create mode 100644 types/lzma-native/index.d.ts create mode 100644 types/lzma-native/lzma-native-tests.ts create mode 100644 types/lzma-native/tsconfig.json create mode 100644 types/lzma-native/tslint.json diff --git a/types/lzma-native/index.d.ts b/types/lzma-native/index.d.ts new file mode 100644 index 0000000000..2581f4dc65 --- /dev/null +++ b/types/lzma-native/index.d.ts @@ -0,0 +1,130 @@ +// Type definitions for lzma-native 4.0 +// Project: https://github.com/addaleax/lzma-native +// Definitions by: Evan Cameron +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +declare module "lzma-native" { + import { Stream } from "stream"; + export type LzmaOptions = { + synchronous?: boolean; + bufsize?: number; + memlimit?: number; + check?: Check; + preset?: Preset; + flags?: + | "TELL_NO_CHECK" + | "TELL_UNSUPPORTED_CHECK" + | "TELL_ANY_CHECK" + | "CONCATENATED"; + threads?: number; + blockSize?: number; + timeout?: number; + }; + + export type Check = + | "CHECK_CRC32" + | "CHECK_CRC64" + | "CHECK_NONE" + | "CHECK_SHA256"; + + export type Coders = + | "easyEncoder" + | "aloneDecoder" + | "rawEncoder" + | "autoDecoder" + | "aloneEncoder" + | "streamEncoder" + | "streamDecoder"; + + export type Preset = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; + + export type FileOptions = { + fileSize: number; + memlimit?: number; + read: ( + count: number, + offset: number, + cb: (err: any, buffer: Buffer) => void + ) => void; + }; + + export type StreamInfo = { + streamPadding: number; + memlimit: number; + streams: number; + blocks: number; + fileSize: number; + uncompressedSize: number; + checks: number; + }; + + export function createStream( + coder: Coders, + options?: LzmaOptions + ): JSLzmaStream; + + export function createCompressor(options?: LzmaOptions): JSLzmaStream; + export function createDecompressor(options?: LzmaOptions): JSLzmaStream; + export function crc32( + input: string, + encoding?: string, + previous?: number + ): string; + export function isXZ(buf: Buffer | string): boolean; + export function versionString(): string; + export function versionNumber(): number; + export function checkSize(check: Check): number; + export function easyDecoderMemusage(preset: Preset): number; + export function easyEncoderMemusage(preset: Preset): number; + export function rawDecoderMemusage(preset: Preset): number; + export function rawEncoderMemusage(preset: Preset): number; + + export function Compressor( + preset?: Preset, + options?: LzmaOptions + ): JSLzmaStream; + export function Decompressor(options?: LzmaOptions): JSLzmaStream; + + export function parseFileIndex( + options: FileOptions, + callback?: (err: any, info?: StreamInfo) => void + ): void; + export function parseFileIndexFD( + fileDescriptor: number, + callback?: (err: any, info?: StreamInfo) => void + ): void; + + export function compress( + buf: Buffer | string, + options?: LzmaOptions | Preset, + on_finish?: (result: Buffer) => void + ): void; + export function decompress( + buf: Buffer | string, + options?: LzmaOptions | Preset, + on_finish?: (result: Buffer) => void + ): void; + export function LZMA(): { + compress( + buf: Buffer | string, + mode: Preset, + on_finish: (result: Buffer) => void, + on_progress?: (progress: number) => void + ): void; + decompress( + buf: Buffer | string, + on_finish: (result: Buffer) => void, + on_progress?: (progress: number) => void + ): void; + }; + + export class JSLzmaStream extends Stream.Transform { + constructor(nativeStream: Stream, options: LzmaOptions); + bufsize(): number; + bufsize(size: number): void; + totalInt(): number; + totalOut(): number; + cleanUp(): void; + } +} diff --git a/types/lzma-native/lzma-native-tests.ts b/types/lzma-native/lzma-native-tests.ts new file mode 100644 index 0000000000..2b94092c00 --- /dev/null +++ b/types/lzma-native/lzma-native-tests.ts @@ -0,0 +1,55 @@ +import * as lzma from "lzma-native"; +import { CHECK_CRC32 } from "lzma-native"; +var fs = require("fs"); + +var compressor = lzma.createCompressor(); +var input = fs.createReadStream("tsconfig.json"); +var output = fs.createWriteStream("tsconfig.json.xz"); + +input.pipe(compressor).pipe(output); + +lzma.compress("Banana", undefined, function(result) { + console.log(result); // +}); + +lzma.compress("Bananas", 6, function(result) { + lzma.decompress(result, undefined, function(decompressedResult) { + console.log(decompressedResult.toString() == "Bananas"); + }); +}); + +lzma.LZMA().compress("Bananas", 4, function(result) { + lzma.LZMA().decompress(result, function(decompressedResult) { + console.log("Bananas" == decompressedResult.toString()); + }); +}); + +var compressor = lzma.Compressor(); + +process.stdin.pipe(compressor).pipe(process.stdout); +lzma.crc32("Banana"); // => 69690105 +lzma.checkSize("CHECK_SHA256"); // => 16 +lzma.checkSize("CHECK_CRC32"); // => 4 +lzma.easyDecoderMemusage(6); // => 8454192 +lzma.easyEncoderMemusage(6); // => 97620499 +lzma.versionString(); // => '5.2.3' +lzma.versionNumber(); // => 50020012 +lzma.isXZ("Banana"); // => false + +fs.open("test/hamlet.txt.xz", "r", function(err: string, fd: number) { + // handle error + lzma.parseFileIndexFD(fd, function(err, info) { + // handle error + if (err) { + console.log(err); + } + // do something with e.g. info.uncompressedSize + + fs.close(fd, function(err: any) { + /* handle error */ + if (err) { + console.log(err); + } + }); + }); +}); diff --git a/types/lzma-native/tsconfig.json b/types/lzma-native/tsconfig.json new file mode 100644 index 0000000000..524764224f --- /dev/null +++ b/types/lzma-native/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "strict": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "lzma-native-tests.ts"] +} diff --git a/types/lzma-native/tslint.json b/types/lzma-native/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/lzma-native/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1596d8fa41b3f4ead68a9dfc9d299ace430bd375 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 16:22:38 -0400 Subject: [PATCH 0232/1121] [prompts] upgrade ts version --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 498a6b0c33..cbec1d3ed7 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/terkelg/prompts // Definitions by: Berkay GURSOY // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 +// TypeScript Version: 2.3 export = prompts; From 2607ff16899410f665872764468e0c17285edfb3 Mon Sep 17 00:00:00 2001 From: Evan Cameron Date: Fri, 2 Nov 2018 16:36:07 -0400 Subject: [PATCH 0233/1121] Fix lint errors --- types/lzma-native/index.d.ts | 215 ++++++++++++------------- types/lzma-native/lzma-native-tests.ts | 34 ++-- types/lzma-native/tsconfig.json | 5 +- 3 files changed, 128 insertions(+), 126 deletions(-) diff --git a/types/lzma-native/index.d.ts b/types/lzma-native/index.d.ts index 2581f4dc65..33165885da 100644 --- a/types/lzma-native/index.d.ts +++ b/types/lzma-native/index.d.ts @@ -2,129 +2,128 @@ // Project: https://github.com/addaleax/lzma-native // Definitions by: Evan Cameron // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /// -declare module "lzma-native" { - import { Stream } from "stream"; - export type LzmaOptions = { - synchronous?: boolean; - bufsize?: number; - memlimit?: number; - check?: Check; - preset?: Preset; - flags?: - | "TELL_NO_CHECK" - | "TELL_UNSUPPORTED_CHECK" - | "TELL_ANY_CHECK" - | "CONCATENATED"; - threads?: number; - blockSize?: number; - timeout?: number; - }; +import { Stream } from "stream"; +export interface LzmaOptions { + synchronous?: boolean; + bufsize?: number; + memlimit?: number; + check?: Check; + preset?: Preset; + flags?: + | "TELL_NO_CHECK" + | "TELL_UNSUPPORTED_CHECK" + | "TELL_ANY_CHECK" + | "CONCATENATED"; + threads?: number; + blockSize?: number; + timeout?: number; +} - export type Check = - | "CHECK_CRC32" - | "CHECK_CRC64" - | "CHECK_NONE" - | "CHECK_SHA256"; +export type Check = + | "CHECK_CRC32" + | "CHECK_CRC64" + | "CHECK_NONE" + | "CHECK_SHA256"; - export type Coders = - | "easyEncoder" - | "aloneDecoder" - | "rawEncoder" - | "autoDecoder" - | "aloneEncoder" - | "streamEncoder" - | "streamDecoder"; +export type Coders = + | "easyEncoder" + | "aloneDecoder" + | "rawEncoder" + | "autoDecoder" + | "aloneEncoder" + | "streamEncoder" + | "streamDecoder"; - export type Preset = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; +export type Preset = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - export type FileOptions = { - fileSize: number; - memlimit?: number; - read: ( - count: number, - offset: number, - cb: (err: any, buffer: Buffer) => void - ) => void; - }; +export interface FileOptions { + fileSize: number; + memlimit?: number; + read: ( + count: number, + offset: number, + cb: (err: any, buffer: Buffer) => void + ) => void; +} - export type StreamInfo = { - streamPadding: number; - memlimit: number; - streams: number; - blocks: number; - fileSize: number; - uncompressedSize: number; - checks: number; - }; +export interface StreamInfo { + streamPadding: number; + memlimit: number; + streams: number; + blocks: number; + fileSize: number; + uncompressedSize: number; + checks: number; +} - export function createStream( - coder: Coders, - options?: LzmaOptions - ): JSLzmaStream; +export function createStream( + coder: Coders, + options?: LzmaOptions +): JSLzmaStream; - export function createCompressor(options?: LzmaOptions): JSLzmaStream; - export function createDecompressor(options?: LzmaOptions): JSLzmaStream; - export function crc32( - input: string, - encoding?: string, - previous?: number - ): string; - export function isXZ(buf: Buffer | string): boolean; - export function versionString(): string; - export function versionNumber(): number; - export function checkSize(check: Check): number; - export function easyDecoderMemusage(preset: Preset): number; - export function easyEncoderMemusage(preset: Preset): number; - export function rawDecoderMemusage(preset: Preset): number; - export function rawEncoderMemusage(preset: Preset): number; +export function createCompressor(options?: LzmaOptions): JSLzmaStream; +export function createDecompressor(options?: LzmaOptions): JSLzmaStream; +export function crc32( + input: string, + encoding?: string, + previous?: number +): string; +export function isXZ(buf: Buffer | string): boolean; +export function versionString(): string; +export function versionNumber(): number; +export function checkSize(check: Check): number; +export function easyDecoderMemusage(preset: Preset): number; +export function easyEncoderMemusage(preset: Preset): number; +export function rawDecoderMemusage(preset: Preset): number; +export function rawEncoderMemusage(preset: Preset): number; - export function Compressor( - preset?: Preset, - options?: LzmaOptions - ): JSLzmaStream; - export function Decompressor(options?: LzmaOptions): JSLzmaStream; +export function Compressor( + preset?: Preset, + options?: LzmaOptions +): JSLzmaStream; +export function Decompressor(options?: LzmaOptions): JSLzmaStream; - export function parseFileIndex( - options: FileOptions, - callback?: (err: any, info?: StreamInfo) => void - ): void; - export function parseFileIndexFD( - fileDescriptor: number, - callback?: (err: any, info?: StreamInfo) => void - ): void; +export function parseFileIndex( + options: FileOptions, + callback?: (err: any, info?: StreamInfo) => void +): void; +export function parseFileIndexFD( + fileDescriptor: number, + callback?: (err: any, info?: StreamInfo) => void +): void; - export function compress( +export function compress( + buf: Buffer | string, + options?: LzmaOptions | Preset, + on_finish?: (result: Buffer) => void +): void; +export function decompress( + buf: Buffer | string, + options?: LzmaOptions | Preset, + on_finish?: (result: Buffer) => void +): void; +export function LZMA(): { + compress( buf: Buffer | string, - options?: LzmaOptions | Preset, - on_finish?: (result: Buffer) => void + mode: Preset, + on_finish: (result: Buffer) => void, + on_progress?: (progress: number) => void ): void; - export function decompress( + decompress( buf: Buffer | string, - options?: LzmaOptions | Preset, - on_finish?: (result: Buffer) => void + on_finish: (result: Buffer) => void, + on_progress?: (progress: number) => void ): void; - export function LZMA(): { - compress( - buf: Buffer | string, - mode: Preset, - on_finish: (result: Buffer) => void, - on_progress?: (progress: number) => void - ): void; - decompress( - buf: Buffer | string, - on_finish: (result: Buffer) => void, - on_progress?: (progress: number) => void - ): void; - }; +}; - export class JSLzmaStream extends Stream.Transform { - constructor(nativeStream: Stream, options: LzmaOptions); - bufsize(): number; - bufsize(size: number): void; - totalInt(): number; - totalOut(): number; - cleanUp(): void; - } +export class JSLzmaStream extends Stream.Transform { + constructor(nativeStream: Stream, options: LzmaOptions); + bufsize(): number; + bufsize(size: number): void; + totalInt(): number; + totalOut(): number; + cleanUp(): void; } diff --git a/types/lzma-native/lzma-native-tests.ts b/types/lzma-native/lzma-native-tests.ts index 2b94092c00..44a5eab221 100644 --- a/types/lzma-native/lzma-native-tests.ts +++ b/types/lzma-native/lzma-native-tests.ts @@ -1,32 +1,31 @@ import * as lzma from "lzma-native"; -import { CHECK_CRC32 } from "lzma-native"; -var fs = require("fs"); +import * as fs from "fs"; -var compressor = lzma.createCompressor(); -var input = fs.createReadStream("tsconfig.json"); -var output = fs.createWriteStream("tsconfig.json.xz"); +const compressor = lzma.createCompressor(); +const input = fs.createReadStream("tsconfig.json"); +const output = fs.createWriteStream("tsconfig.json.xz"); input.pipe(compressor).pipe(output); -lzma.compress("Banana", undefined, function(result) { +lzma.compress("Banana", undefined, result => { console.log(result); // }); -lzma.compress("Bananas", 6, function(result) { - lzma.decompress(result, undefined, function(decompressedResult) { - console.log(decompressedResult.toString() == "Bananas"); +lzma.compress("Bananas", 6, result => { + lzma.decompress(result, undefined, decompressedResult => { + console.log(decompressedResult.toString() === "Bananas"); }); }); -lzma.LZMA().compress("Bananas", 4, function(result) { - lzma.LZMA().decompress(result, function(decompressedResult) { - console.log("Bananas" == decompressedResult.toString()); +lzma.LZMA().compress("Bananas", 4, result => { + lzma.LZMA().decompress(result, decompressedResult => { + console.log("Bananas" === decompressedResult.toString()); }); }); -var compressor = lzma.Compressor(); +const comp = lzma.Compressor(); -process.stdin.pipe(compressor).pipe(process.stdout); +process.stdin.pipe(comp).pipe(process.stdout); lzma.crc32("Banana"); // => 69690105 lzma.checkSize("CHECK_SHA256"); // => 16 lzma.checkSize("CHECK_CRC32"); // => 4 @@ -36,16 +35,17 @@ lzma.versionString(); // => '5.2.3' lzma.versionNumber(); // => 50020012 lzma.isXZ("Banana"); // => false -fs.open("test/hamlet.txt.xz", "r", function(err: string, fd: number) { +fs.open("test/hamlet.txt.xz", "r", (err: any, fd: number) => { + if (err) return; // handle error - lzma.parseFileIndexFD(fd, function(err, info) { + lzma.parseFileIndexFD(fd, (err, info) => { // handle error if (err) { console.log(err); } // do something with e.g. info.uncompressedSize - fs.close(fd, function(err: any) { + fs.close(fd, (err: any) => { /* handle error */ if (err) { console.log(err); diff --git a/types/lzma-native/tsconfig.json b/types/lzma-native/tsconfig.json index 524764224f..fa7667f123 100644 --- a/types/lzma-native/tsconfig.json +++ b/types/lzma-native/tsconfig.json @@ -2,7 +2,10 @@ "compilerOptions": { "module": "commonjs", "lib": ["es6"], - "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noImplicitThis": true, "baseUrl": "../", "typeRoots": ["../"], "types": [], From 3f661f9239153ec881f8545266b241f0ace9f6f1 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 16:36:20 -0400 Subject: [PATCH 0234/1121] Update index.d.ts --- types/prompts/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index cbec1d3ed7..1bc9c0ca66 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -6,7 +6,7 @@ export = prompts; -declare function prompts(questions: prompts.PromptObject | prompts.PromptObject[], options?: prompts.Options): prompts.Answers; +declare function prompts(questions: prompts.PromptObject | Array>, options?: prompts.Options): prompts.Answers; declare namespace prompts { // Circular reference from prompts @@ -73,6 +73,6 @@ declare namespace prompts { suggest?: ((prev: any, values: any, prompt: PromptObject) => void); limit?: number; } - + type Answers = { [id in T]: string }; } From b8190e564863776b1804e2ad8c11ed3ba742af74 Mon Sep 17 00:00:00 2001 From: spacejack Date: Fri, 2 Nov 2018 17:20:31 -0400 Subject: [PATCH 0235/1121] Fix signatures for drawPolygon, drawPolyline, drawBezier --- types/gm/gm-tests.ts | 14 +++++++------- types/gm/index.d.ts | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/types/gm/gm-tests.ts b/types/gm/gm-tests.ts index 9ff16940b7..b22b7ffbc5 100644 --- a/types/gm/gm-tests.ts +++ b/types/gm/gm-tests.ts @@ -325,17 +325,17 @@ gm(src) }) .draw(options) .drawArc(x, y, x, y, radius, radius) - .drawBezier(x, y, x, y) - .drawBezier(x, y, x, y, x, y) - .drawBezier(x, y, x, y, x, y, x, y) + .drawBezier([x, y], [x, y]) + .drawBezier([x, y], [x, y], [x, y]) + .drawBezier([x, y], [x, y], [x, y], [x, y]) .drawCircle(x, y, x, y) .drawEllipse(x, y, radius, radius, radius, radius) .drawLine(x, y, x, y) .drawPoint(x, y) - .drawPolygon(x, y, x, y, x, y) - .drawPolygon(x, y, x, y, x, y, x, y) - .drawPolyline(x, y, x, y, x, y) - .drawPolyline(x, y, x, y, x, y, x, y) + .drawPolygon([x, y], [x, y], [x, y]) + .drawPolygon([x, y], [x, y], [x, y], [x, y]) + .drawPolyline([x, y], [x, y], [x, y]) + .drawPolyline([x, y], [x, y], [x, y], [x, y]) .drawRectangle(x, y, x, y) .drawRectangle(x, y, x, y, radius) .drawRectangle(x, y, x, y, radius, radius) diff --git a/types/gm/index.d.ts b/types/gm/index.d.ts index 6a5214d8a1..887719e999 100644 --- a/types/gm/index.d.ts +++ b/types/gm/index.d.ts @@ -295,13 +295,13 @@ declare namespace m { // Drawing Operations draw(args: string): State; drawArc(x0: number, y0: number, x1: number, y1: number, r0: number, r1: number): State; - drawBezier(x0: number, y0: number, x1: number, y1: number, x2?: number, y2?: number, ...coords: number[]): State; + drawBezier(...coords: number[][]): State; drawCircle(x0: number, y0: number, x1: number, y1: number): State; drawEllipse(x0: number, y0: number, rx: number, ry: number, a0: number, a1: number): State; drawLine(x0: number, y0: number, x1: number, y1: number): State; drawPoint(x: number, y: number): State; - drawPolygon(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, ...coords: number[]): State; - drawPolyline(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, ...coords: number[]): State; + drawPolygon(...coords: number[][]): State; + drawPolyline(...coords: number[][]): State; drawRectangle(x0: number, y0: number, x1: number, y1: number, wc?: number, hc?: number): State; drawText(x: number, y: number, text: string, gravity?: GravityDirection | string): State; fill(color: string): State; From 21709f6f4d8d7563606233c0f11274f5fbf99f34 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Fri, 2 Nov 2018 15:23:48 -0600 Subject: [PATCH 0236/1121] fix: changed return type of _.MapCache.prototype.set --- types/lodash/common/common.d.ts | 2 +- types/lodash/lodash-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/lodash/common/common.d.ts b/types/lodash/common/common.d.ts index cbfc534652..66dbafafb8 100644 --- a/types/lodash/common/common.d.ts +++ b/types/lodash/common/common.d.ts @@ -149,7 +149,7 @@ declare module "../index" { * @param value The value to cache. * @return Returns the cache object. */ - set(key: any, value: any): Dictionary; + set(key: any, value: any): this; /** * Removes all key-value entries from the map. diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 3ce044165a..4f7f229fe6 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -3467,7 +3467,7 @@ fp.now(); // $ExpectType number delete(key: string) { return true; }, get(key: string): any { return 1; }, has(key: string) { return true; }, - set(key: string, value: any): _.Dictionary { return {}; }, + set(key: string, value: any): _.MapCache { return this; }, clear() { }, }; From 1bccd1bcc12e89d736905721871663487837e3f0 Mon Sep 17 00:00:00 2001 From: spacejack Date: Fri, 2 Nov 2018 17:40:28 -0400 Subject: [PATCH 0237/1121] Require minimum number of coordinates --- types/gm/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/gm/index.d.ts b/types/gm/index.d.ts index 887719e999..438a7733b6 100644 --- a/types/gm/index.d.ts +++ b/types/gm/index.d.ts @@ -295,13 +295,13 @@ declare namespace m { // Drawing Operations draw(args: string): State; drawArc(x0: number, y0: number, x1: number, y1: number, r0: number, r1: number): State; - drawBezier(...coords: number[][]): State; + drawBezier(coord0: number[], coord1: number[], ...coords: number[][]): State; drawCircle(x0: number, y0: number, x1: number, y1: number): State; drawEllipse(x0: number, y0: number, rx: number, ry: number, a0: number, a1: number): State; drawLine(x0: number, y0: number, x1: number, y1: number): State; drawPoint(x: number, y: number): State; - drawPolygon(...coords: number[][]): State; - drawPolyline(...coords: number[][]): State; + drawPolygon(coord0: number[], coord1: number[], coord2: number[], ...coords: number[][]): State; + drawPolyline(coord0: number[], coord1: number[], coord2: number[], ...coords: number[][]): State; drawRectangle(x0: number, y0: number, x1: number, y1: number, wc?: number, hc?: number): State; drawText(x: number, y: number, text: string, gravity?: GravityDirection | string): State; fill(color: string): State; From d8b9276ec0b8fd5a4fb74dae2aa4951f4483f170 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 17:45:48 -0400 Subject: [PATCH 0238/1121] Update index.d.ts --- types/prompts/index.d.ts | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 1bc9c0ca66..b5b9f38285 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -6,7 +6,10 @@ export = prompts; -declare function prompts(questions: prompts.PromptObject | Array>, options?: prompts.Options): prompts.Answers; +declare function prompts( + questions: prompts.PromptObject | Array>, + options?: prompts.Options +): Promise>; declare namespace prompts { // Circular reference from prompts @@ -15,8 +18,7 @@ declare namespace prompts { function inject(obj: any): void; namespace inject { - const prototype: { - }; + const prototype: {}; } namespace prompts { @@ -52,14 +54,14 @@ declare namespace prompts { } interface PromptObject { - type: string | ((prev: any, values: any, prompt: PromptObject) => void); - name: T | ((prev: any, values: any, prompt: PromptObject) => void); - message?: string | ((prev: any, values: any, prompt: PromptObject) => void); + type: ValueOrFunc; + name: ValueOrFunc; + message?: ValueOrFunc; initial?: string; style?: string; - format?: ((prev: any, values: any, prompt: PromptObject) => void); - validate?: ((prev: any, values: any, prompt: PromptObject) => void); - onState?: ((prev: any, values: any, prompt: PromptObject) => void); + format?: PrevCaller; + validate?: PrevCaller; + onState?: PrevCaller; min?: number; max?: number; float?: boolean; @@ -74,5 +76,13 @@ declare namespace prompts { limit?: number; } - type Answers = { [id in T]: string }; + type Answers = { [id in T]: any }; + + type PrevCaller = ( + prev: any, + values: Answers, + prompt: PromptObject + ) => R; + + type ValueOrFunc = T | PrevCaller; } From be502a6c4bbd853dd10f7eb14bf371e40110c12e Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 18:04:02 -0400 Subject: [PATCH 0239/1121] Update prompts-tests.ts --- types/prompts/prompts-tests.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/types/prompts/prompts-tests.ts b/types/prompts/prompts-tests.ts index 0b89cb3721..bd35868c66 100644 --- a/types/prompts/prompts-tests.ts +++ b/types/prompts/prompts-tests.ts @@ -1,8 +1,14 @@ import prompts = require("prompts"); -const response = prompts({ - type: 'number', - name: 'value', - message: 'Input value to double:', - validate: (value: any) => value < 0 ? `Cant be less than zero` : true -}); +type HasProperty = K extends keyof T ? true : false; + +(async () => { + const response = await prompts({ + type: "number", + name: "value", + message: "Input value to double:", + validate: (value: any) => (value < 0 ? `Cant be less than zero` : true) + }); + const HasPropValue: HasProperty = true; + const DoesntHavePropAsdf: HasProperty = false; +})(); From 76cb0a95c9ec11e43ba79a074d808be8e7944726 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 18:07:39 -0400 Subject: [PATCH 0240/1121] Update index.d.ts --- types/prompts/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index b5b9f38285..9155ded98b 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for prompts 1.1 // Project: https://github.com/terkelg/prompts // Definitions by: Berkay GURSOY +// Daniel Perez Alvarez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From a341af86b1685e2b45b100da1cd580a6d05193a6 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 18:33:51 -0400 Subject: [PATCH 0241/1121] Update index.d.ts --- types/prompts/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 9155ded98b..6982173159 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Berkay GURSOY // Daniel Perez Alvarez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 export = prompts; From 2ab4320c9c34aff98377268c996dfee2852a58d7 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Fri, 2 Nov 2018 18:48:39 -0400 Subject: [PATCH 0242/1121] Update index.d.ts --- types/prompts/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/prompts/index.d.ts b/types/prompts/index.d.ts index 6982173159..7aa3f2ea63 100644 --- a/types/prompts/index.d.ts +++ b/types/prompts/index.d.ts @@ -77,13 +77,13 @@ declare namespace prompts { limit?: number; } - type Answers = { [id in T]: any }; + type Answers = { [id in T]: any }; - type PrevCaller = ( + type PrevCaller = ( prev: any, values: Answers, prompt: PromptObject ) => R; - type ValueOrFunc = T | PrevCaller; + type ValueOrFunc = T | PrevCaller; } From 3ea302328c1dc5fcc1c369226335053df99d2261 Mon Sep 17 00:00:00 2001 From: Elizabeth Samuel Date: Fri, 2 Nov 2018 16:02:46 -0700 Subject: [PATCH 0243/1121] office-js: Add ICalendar to AttachmentContentFormat enum --- types/office-js/index.d.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 105062a56e..2eaf9c5c7b 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -7376,7 +7376,12 @@ declare namespace Office { /** * The content of the attachment is returned as a string representing an .eml formatted file. */ - Eml = "eml" + Eml = "eml", + + /** + * The content of the attachment is returned as a string representing an .icalendar formatted file. + */ + ICalendar = "iCalendar" } /** * Specifies whether an attachment was added to or removed from an item. @@ -8574,8 +8579,13 @@ declare namespace Office { content: string; /** * The string format to use for an attachment's content. - * For file attachments, the formatting is a base64-encoded string. - * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * + * For file attachments, the formatting is a base64-encoded string. + * + * For item attachments that represent messages, the formatting is a string representing an .eml formatted file. + * + * For item attachments that represent calendar items, the formatting is an .icalendar file. + * * For cloud attachments, the formatting is a URL string. */ format: Office.MailboxEnums.AttachmentContentFormat; From 7f58de6fb2c248e0347d539b31dcfa4687bfec05 Mon Sep 17 00:00:00 2001 From: g1eny0ung Date: Sat, 3 Nov 2018 12:37:04 +0800 Subject: [PATCH 0244/1121] Add alert prop's types --- types/react-alert/index.d.ts | 73 +++++++++++++++++++++++-- types/react-alert/react-alert-tests.tsx | 14 +++-- 2 files changed, 76 insertions(+), 11 deletions(-) diff --git a/types/react-alert/index.d.ts b/types/react-alert/index.d.ts index cbc48d247f..6c94da77b0 100644 --- a/types/react-alert/index.d.ts +++ b/types/react-alert/index.d.ts @@ -17,18 +17,81 @@ export type AlertPosition = export type AlertType = 'info' | 'success' | 'error'; export type AlertTransition = 'fade' | 'scale'; -export interface ProviderProps { +export interface ProviderOptions { + /** + * The margin of each alert + * + * Default value: '10px' + */ offset?: string; + /** + * The position of the alerts in the page + * + * Default value: 'top center' + */ position?: AlertPosition; + /** + * Timeout to alert remove itself, if set to 0 it never removes itself + * + * Default value: 0 + */ timeout?: number; + /** + * The default alert type used when calling this.props.alert.show + * + * Default value: 'info' + */ type?: AlertType; + /** + * The transition animation + * + * Default value: 'fade' + */ transition?: AlertTransition; + /** + * The z-index of alerts + * + * Default value: 100 + */ zIndex?: number; - template: React.ComponentType; } -export class Provider extends React.Component {} +export class Provider extends React.Component {} -export const Alert: React.Consumer; +export const Alert: React.Consumer; -export function withAlert

(c: React.ComponentType

): React.ComponentType

; +export interface AlertCustomOptions { + /** + * Custom timeout just for this one alert + */ + timeout?: number; + /** + * Callback that will be executed after this alert open + */ + onOpen?(): undefined; + /** + * Callback that will be executed after this alert is removed + */ + onClose?(): undefined; +} + +export interface AlertCustomOptionsWithType extends AlertCustomOptions { + type?: AlertType; +} + +export interface InjectedAlertProp { + show( + message?: string, + options?: AlertCustomOptionsWithType + ): InjectedAlertProp; + remove(alert: InjectedAlertProp): undefined; + success(message?: string, options?: AlertCustomOptions): InjectedAlertProp; + error(message?: string, options?: AlertCustomOptions): InjectedAlertProp; + info(message?: string, options?: AlertCustomOptions): InjectedAlertProp; +} + +export function withAlert

( + c: React.ComponentType

+): React.ComponentType>>; diff --git a/types/react-alert/react-alert-tests.tsx b/types/react-alert/react-alert-tests.tsx index d421d8cc88..c6088a52a8 100644 --- a/types/react-alert/react-alert-tests.tsx +++ b/types/react-alert/react-alert-tests.tsx @@ -4,10 +4,12 @@ import { Alert, withAlert, AlertPosition, - AlertTransition + AlertTransition, + ProviderOptions, + InjectedAlertProp } from 'react-alert'; -class AppWithoutAlert extends React.Component { +class AppWithoutAlert extends React.Component<{ alert: InjectedAlertProp }> { render() { return (

+ + + + ` + ); + }); +}; diff --git a/types/react-instantsearch-dom/server.d.ts b/types/react-instantsearch-dom/server.d.ts new file mode 100644 index 0000000000..b1ba930ace --- /dev/null +++ b/types/react-instantsearch-dom/server.d.ts @@ -0,0 +1,14 @@ +import * as React from 'react'; + +/** + * Creates a specialized root InstantSearch component. It accepts + * an algolia client and a specification of the root Element. + * @param defaultAlgoliaClient - a function that builds an Algolia client + * @returns an InstantSearch root + */ +export function createInstantSearch( + defaultAlgoliaClient?: (appId: string, apiKey: string, options: { _useRequestCache: boolean }) => object +): { + InstantSearch: React.ComponentClass; + findResultsState(App: React.ComponentType, props: any): Promise +}; diff --git a/types/react-instantsearch/server.d.ts b/types/react-instantsearch/server.d.ts new file mode 100644 index 0000000000..d8fb0d1a46 --- /dev/null +++ b/types/react-instantsearch/server.d.ts @@ -0,0 +1 @@ +export { createInstantSearch } from 'react-instantsearch-dom/server'; From 666f581e83528f0a546d0d5297aa39247d14cf2d Mon Sep 17 00:00:00 2001 From: Gordon Date: Mon, 5 Nov 2018 10:27:19 -0600 Subject: [PATCH 0303/1121] Add server.d.ts to files in tsconfig --- types/react-instantsearch-dom/tsconfig.json | 1 + types/react-instantsearch/tsconfig.json | 1 + 2 files changed, 2 insertions(+) diff --git a/types/react-instantsearch-dom/tsconfig.json b/types/react-instantsearch-dom/tsconfig.json index 3a8fbf89ad..15ec605c21 100644 --- a/types/react-instantsearch-dom/tsconfig.json +++ b/types/react-instantsearch-dom/tsconfig.json @@ -20,6 +20,7 @@ }, "files": [ "index.d.ts", + "server.d.ts", "react-instantsearch-dom-tests.tsx" ] } diff --git a/types/react-instantsearch/tsconfig.json b/types/react-instantsearch/tsconfig.json index 9782cbd17e..79afa53442 100644 --- a/types/react-instantsearch/tsconfig.json +++ b/types/react-instantsearch/tsconfig.json @@ -21,6 +21,7 @@ "connectors.d.ts", "dom.d.ts", "native.d.ts", + "server.d.ts", "react-instantsearch-tests.tsx" ] } From 8996ccf8789076eebe761084462396447a2e7f9d Mon Sep 17 00:00:00 2001 From: Frithjof Winkelmann Date: Mon, 5 Nov 2018 17:43:30 +0100 Subject: [PATCH 0304/1121] Add types for rmc-drawer --- types/rmc-drawer/index.d.ts | 33 +++++++++++++++++++++++++++ types/rmc-drawer/rmc-drawer-tests.tsx | 19 +++++++++++++++ types/rmc-drawer/tsconfig.json | 25 ++++++++++++++++++++ types/rmc-drawer/tslint.json | 1 + 4 files changed, 78 insertions(+) create mode 100644 types/rmc-drawer/index.d.ts create mode 100644 types/rmc-drawer/rmc-drawer-tests.tsx create mode 100644 types/rmc-drawer/tsconfig.json create mode 100644 types/rmc-drawer/tslint.json diff --git a/types/rmc-drawer/index.d.ts b/types/rmc-drawer/index.d.ts new file mode 100644 index 0000000000..d45ec2a67a --- /dev/null +++ b/types/rmc-drawer/index.d.ts @@ -0,0 +1,33 @@ +// Type definitions for rmc-drawer 0.4 +// Project: https://github.com/react-component/m-drawer +// Definitions by: Frithjof Winkelmann +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as moment from "moment"; +import * as React from 'react'; + +interface DrawerProps { + className?: string; + prefixCls?: string; + children?: React.ReactNode | React.ReactNode[]; + style?: React.CSSProperties; + sidebarStyle?: React.CSSProperties; + contentStyle?: React.CSSProperties; + overlayStyle?: React.CSSProperties; + dragHandleStyle?: React.CSSProperties; + sidebar?: React.ReactNode; + onOpenChange?: (open: boolean, overlay?: { overlayClicked: boolean }) => void; + open?: boolean; + position?: 'left' | 'right' | 'top' | 'bottom'; + docked?: boolean; + transitions?: boolean; + touch?: boolean; + enableDragHandle?: boolean; + dragToggleDistance?: number; +} + +declare class Drawer extends React.Component> { +} + +export = Drawer; diff --git a/types/rmc-drawer/rmc-drawer-tests.tsx b/types/rmc-drawer/rmc-drawer-tests.tsx new file mode 100644 index 0000000000..95256785af --- /dev/null +++ b/types/rmc-drawer/rmc-drawer-tests.tsx @@ -0,0 +1,19 @@ +import Drawer from 'rmc-drawer'; +import * as React from 'react'; + +const sidebar = (
+

+ sidebar +

+

this is content!

+
); + +const drawer = {}}> +
+

React component

+ Testcontent +
+
; diff --git a/types/rmc-drawer/tsconfig.json b/types/rmc-drawer/tsconfig.json new file mode 100644 index 0000000000..35dc08b4ff --- /dev/null +++ b/types/rmc-drawer/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "rmc-drawer-tests.tsx" + ] +} diff --git a/types/rmc-drawer/tslint.json b/types/rmc-drawer/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/rmc-drawer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 0b0ef526061664935053fc030973e4f14a3d6c68 Mon Sep 17 00:00:00 2001 From: Deadly0 Date: Mon, 5 Nov 2018 20:13:11 +0300 Subject: [PATCH 0305/1121] Improve Enum typing, add helpers. --- types/meteor-astronomy/index.d.ts | 21 +++++--- .../meteor-astronomy-tests.ts | 54 ++++++++++++++----- 2 files changed, 56 insertions(+), 19 deletions(-) diff --git a/types/meteor-astronomy/index.d.ts b/types/meteor-astronomy/index.d.ts index 2bef7e728c..7cfd2c7211 100644 --- a/types/meteor-astronomy/index.d.ts +++ b/types/meteor-astronomy/index.d.ts @@ -7,6 +7,11 @@ /// declare namespace MeteorAstronomy { + type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T]; // tslint:disable-line:ban-types + type NonFunctionProperties = Pick>; + type FunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? K : never }[keyof T]; // tslint:disable-line:ban-types + type FunctionProperties = Pick>; + type TypeOptionsPrimitives = typeof String | typeof Date | typeof Boolean | typeof Object | typeof Number; type TypeOptions = TypeOptionsPrimitives | TypeOptionsPrimitives[] | Class | Enum; type MongoQuery = object | string; @@ -40,7 +45,11 @@ declare namespace MeteorAstronomy { type ModelField = ModelFullField | TypeOptions; type Fields = { - [P in keyof T]: ModelField; + [P in keyof NonFunctionProperties]: ModelField; + }; + + type Helpers = { + [P in keyof FunctionProperties]: (this: T, ...args: any) => any; }; interface ClassModel { @@ -53,7 +62,7 @@ declare namespace MeteorAstronomy { update: boolean, remove: boolean, } | boolean; - helpers?: object; + helpers?: Helpers; events?: object; meteorMethods?: object; indexes?: object; @@ -61,7 +70,7 @@ declare namespace MeteorAstronomy { interface EnumModel { name: string; - identifiers: T[] | object; + identifiers: string[] | T; } type Model = T & { @@ -92,10 +101,10 @@ declare namespace MeteorAstronomy { update(search: object | string, query: object, callback?: () => void): void; } - interface Enum { + type Enum = T & { getValues(): any[]; - getIdentifier(identifier: T): any; - } + getIdentifier(identifier: any): string; + }; } declare module 'meteor/jagi:astronomy' { // tslint:disable-line:no-single-declare-module diff --git a/types/meteor-astronomy/meteor-astronomy-tests.ts b/types/meteor-astronomy/meteor-astronomy-tests.ts index 871c02964b..59f0f99644 100644 --- a/types/meteor-astronomy/meteor-astronomy-tests.ts +++ b/types/meteor-astronomy/meteor-astronomy-tests.ts @@ -65,8 +65,11 @@ const UserProfile = Class.create({ interface UserInterface extends Meteor.User { address: object; + firstName: string; + lastName: string; phone: string; phoneNumber: string; + fullName: (param: string) => string; } const User = Class.create({ @@ -74,9 +77,11 @@ const User = Class.create({ collection: Meteor.users as Mongo.Collection, fields: { createdAt: Number, + firstName: String, + lastName: String, emails: { type: [Object], - default: () => [], + default: (): Meteor.UserEmail[] => [], }, profile: { type: UserProfile, @@ -91,10 +96,23 @@ const User = Class.create({ }, phone: { type: String, - resolve(doc) { + resolve(doc: UserInterface) { return doc.phoneNumber; + }, + }, + }, + helpers: { + fullName(param: string): string { + const fullName = `${this.firstName} ${this.lastName}`; + + if (param === 'lower') { + return fullName.toLowerCase(); + } else if (param === 'upper') { + return fullName.toUpperCase(); } - } + + return fullName; + }, }, indexes: { fullName: { // Index name. @@ -111,13 +129,16 @@ const user = User.findOne(); user.set({username: 'user1'}); user.save(); -enum IStatus { - OPENED, CLOSED, DONE, CANCELED +interface StatusInterface { + OPENED: number; + CLOSED: number; + DONE: number; + CANCELED: number; } -const Status = Enum.create({ +const Status = Enum.create({ name: 'Status', - identifiers: IStatus, + identifiers: ['OPENED', 'CLOSED', 'DONE', 'CANCELED'], }); const Issue = Class.create({ @@ -131,18 +152,25 @@ const Issue = Class.create({ Status.getValues(); // [0, 1, 2, 3] -const StatusBis = Enum.create({ +interface StatusBisInterface { + OPENED: string; + CLOSED: string; + DONE: string; + CANCELED: string; +} + +const StatusBis = Enum.create({ name: 'Status', identifiers: { - OPENED: 5, - CLOSED: null, - DONE: 15, - CANCELED: undefined + OPENED: 'OPENED', + CLOSED: 'CLOSED', + DONE: 'DONE', + CANCELED: 'CANCELED', } }); StatusBis.getValues(); // [5, 6, 15, 16] -const statusNumber = IStatus.OPENED; +const statusNumber = Status.OPENED; Status.getIdentifier(statusNumber); // "OPENED" From ca9a6163dd8e1813535d47749fc7bcbdb881730e Mon Sep 17 00:00:00 2001 From: Deadly0 Date: Mon, 5 Nov 2018 20:20:05 +0300 Subject: [PATCH 0306/1121] Fix ts version. --- types/meteor-astronomy/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/meteor-astronomy/index.d.ts b/types/meteor-astronomy/index.d.ts index 7cfd2c7211..485b1d9a39 100644 --- a/types/meteor-astronomy/index.d.ts +++ b/types/meteor-astronomy/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jagi/meteor-astronomy/ // Definitions by: Igor Golovin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 3.1 /// From d850bb85bac2f87da3ff4c2d193d4a881d5c48bd Mon Sep 17 00:00:00 2001 From: Deadly0 Date: Mon, 5 Nov 2018 20:25:51 +0300 Subject: [PATCH 0307/1121] Add package.json --- types/meteor-astronomy/index.d.ts | 1 - types/meteor-astronomy/package.json | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 types/meteor-astronomy/package.json diff --git a/types/meteor-astronomy/index.d.ts b/types/meteor-astronomy/index.d.ts index 485b1d9a39..5c5771cb9b 100644 --- a/types/meteor-astronomy/index.d.ts +++ b/types/meteor-astronomy/index.d.ts @@ -2,7 +2,6 @@ // Project: https://github.com/jagi/meteor-astronomy/ // Definitions by: Igor Golovin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.1 /// diff --git a/types/meteor-astronomy/package.json b/types/meteor-astronomy/package.json new file mode 100644 index 0000000000..9d81651687 --- /dev/null +++ b/types/meteor-astronomy/package.json @@ -0,0 +1,8 @@ +{ + "name": "meteor-astronomy", + "version": "2.6", + "types": "./index.d.ts", + "typesVersions": { + ">=3.1": { "*": ["ts3.1/*"] } + } +} From e295c455a5b03a8f35df1046046f920324790b26 Mon Sep 17 00:00:00 2001 From: Deadly0 Date: Mon, 5 Nov 2018 20:38:29 +0300 Subject: [PATCH 0308/1121] Back to ts 2.8 --- types/meteor-astronomy/index.d.ts | 3 ++- types/meteor-astronomy/package.json | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 types/meteor-astronomy/package.json diff --git a/types/meteor-astronomy/index.d.ts b/types/meteor-astronomy/index.d.ts index 5c5771cb9b..c17c1d1498 100644 --- a/types/meteor-astronomy/index.d.ts +++ b/types/meteor-astronomy/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/jagi/meteor-astronomy/ // Definitions by: Igor Golovin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 /// @@ -48,7 +49,7 @@ declare namespace MeteorAstronomy { }; type Helpers = { - [P in keyof FunctionProperties]: (this: T, ...args: any) => any; + [P in keyof FunctionProperties]: (this: T, ...args: any[]) => any; }; interface ClassModel { diff --git a/types/meteor-astronomy/package.json b/types/meteor-astronomy/package.json deleted file mode 100644 index 9d81651687..0000000000 --- a/types/meteor-astronomy/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "meteor-astronomy", - "version": "2.6", - "types": "./index.d.ts", - "typesVersions": { - ">=3.1": { "*": ["ts3.1/*"] } - } -} From 823a2e507d8f2e8e9a7af62186f67e9a771a71da Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 5 Nov 2018 10:49:36 -0800 Subject: [PATCH 0309/1121] d3-shape: Predeclare CanvasRenderingContext2D (#30284) --- types/d3-shape/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index 83222d0ff0..6665e39e6a 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -7,6 +7,10 @@ import { Path } from 'd3-path'; +declare global { + interface CanvasRenderingContext2D {} // tslint:disable-line no-empty-interface +} + // ----------------------------------------------------------------------------------- // Shared Types and Interfaces // ----------------------------------------------------------------------------------- From 5c203c8c61e7d77baaa9594281b9ff2303bd8b86 Mon Sep 17 00:00:00 2001 From: denisname Date: Mon, 5 Nov 2018 19:49:54 +0100 Subject: [PATCH 0310/1121] d3-selection: Use $ExpectError (#29860) * Use $ExpectError * Small change Let's rerun the CI --- types/d3-selection/d3-selection-tests.ts | 236 +++++++++++++--------- types/d3-selection/index.d.ts | 5 +- types/react-native-svg-charts/tslint.json | 8 +- 3 files changed, 149 insertions(+), 100 deletions(-) diff --git a/types/d3-selection/d3-selection-tests.ts b/types/d3-selection/d3-selection-tests.ts index b99c81e39a..2262a89134 100644 --- a/types/d3-selection/d3-selection-tests.ts +++ b/types/d3-selection/d3-selection-tests.ts @@ -74,7 +74,8 @@ let body: d3Selection.Selection = // with Group element of type BaseType and datum of type 'any' The parent element is of type 'null' with datum of type 'undefined' const baseTypeEl2: d3Selection.Selection = d3Selection.select(baseTypeEl.node()); -// let body2: d3Selection.Selection = d3Selection.select(baseTypeEl.node()); // fails as baseTypeEl.node() is of type cannot be assigned to HTMLElement +// $ExpectError +const body2: d3Selection.Selection = d3Selection.select(baseTypeEl.node()); // fails as baseTypeEl.node() is of type cannot be assigned to HTMLElement const body3: d3Selection.Selection = d3Selection.select(body.node()!); // element types match, but datum is of type 'any' as it cannot be inferred from .node() @@ -86,18 +87,21 @@ const body4: d3Selection.Selection // Explicitly cast body.node() to HTMLBodyElement to narrow selection definition. const body5: d3Selection.Selection = d3Selection.select(body.node()!); -// d3Selection.select(baseTypeEl.node()!); // fails as baseTypeEl.node() is not of type HTMLBodyElement +// $ExpectError +d3Selection.select(baseTypeEl.node()!); // fails as baseTypeEl.node() is not of type HTMLBodyElement // test, when it is not certain, whether an element of the type to be selected exists let maybeSVG1: d3Selection.Selection; maybeSVG1 = d3Selection.select('svg'); let maybeSVG2: d3Selection.Selection; -// maybeSVG2 = d3Selection.select(maybeSVG1.node()); // fails with strict function types +// $ExpectError +maybeSVG2 = d3Selection.select(maybeSVG1.node()); // fails with strict function types maybeSVG2 = d3Selection.select(maybeSVG1.node()); // fails, as node type mismatches selection type -// let body7: d3Selection.Selection = d3Selection.select(maybeSVG1.node()); +// $ExpectError +const body7: d3Selection.Selection = d3Selection.select(maybeSVG1.node()); // test "special case DOM objects" @@ -127,7 +131,8 @@ const divElements: d3Selection.Selection = d3Selection.selectAll(baseTypeElements.nodes()); // fails, group elements types not of compatible for baseTypeElements -// let divElements2: d3Selection.Selection = d3Selection.selectAll(baseTypeElements.nodes()); +// $ExpectError +const divElements2: d3Selection.Selection = d3Selection.selectAll(baseTypeElements.nodes()); // element types match, but datum is of type 'any' as it cannot be inferred from .nodes() const divElements3: d3Selection.Selection = d3Selection.selectAll(divElements.nodes()); @@ -137,7 +142,8 @@ const divElements3: d3Selection.Selection const divElements4: d3Selection.Selection = d3Selection.selectAll(divElements.nodes()); -// d3Selection.selectAll(baseTypeElements.nodes()); // fails as baseTypeEl.node() is not of type HTMLBodyElement +// $ExpectError +d3Selection.selectAll(baseTypeElements.nodes()); // fails as baseTypeEl.node() is not of type HTMLBodyElement // selectAll(...) accepts NodeListOf<...> argument @@ -161,8 +167,8 @@ const documentLinks: d3Selection.Selection = d3Selection.select('svg'); let firstG: d3Selection.Selection = svgEl.select('g'); -// let firstG_2: d3Selection.Selection = svgEl.select('g'); // fails, parent element of selection does not change with .select(...) -// firstG = svgEl.select('g'); // fails, element type defaults to 'BaseType', but SVGGElement expected on left-hand side +// $ExpectError +const firstG_2: d3Selection.Selection = svgEl.select('g'); // fails, parent element of selection does not change with .select(...) // firstG = svgEl.select('svg'); // fails, element type of SVGSVGElement provided, but SVGGElement expected on left-hand side (silly test to begin with) // test, when it is not certain, whether an element of the type to be selected exists @@ -180,14 +186,16 @@ firstG = svgEl.select(svgGroupSelector); firstG = svgEl.select(function() { const that: SVGSVGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch console.log('Get Element width using "this": ', this.width.baseVal.value); // 'this' type is SVGSVGElement return this.querySelector('g')!; // this of type SVGSVGElement by type inference }); firstG = svgEl.select(function(d, i, g) { const that: SVGSVGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: SVGDatum = d; const index: number = i; const group: SVGSVGElement[] | d3Selection.ArrayLike = g; @@ -199,9 +207,10 @@ firstG = svgEl.select(function(d, i, g) { return this.querySelector('g')!; // this of type SVGSVGElement by type inference }); -// firstG = svgEl.select(function() { -// return this.querySelector('a'); // fails, return type HTMLAnchorElement is not compatible with SVGGElement expected by firstG -// }); +// $ExpectError +firstG = svgEl.select(function() { + return this.querySelector('a'); // fails, return type HTMLAnchorElement is not compatible with SVGGElement expected by firstG +}); // selectAll(...) sub-selection -------------------------------------------------------------- @@ -219,7 +228,6 @@ emptySubSelection = svgEl.selectAll(undefined); let elementsUnknownData: d3Selection.Selection = svgEl.selectAll('g'); // let elementsAndDataUnknown: d3Selection.Selection = svgEl.selectAll('g'); // fails with strictFunctionTypes let gElementsOldData: d3Selection.Selection = svgEl.selectAll('g'); -// gElementsOldData = svgEl.selectAll('g'); // fails default type parameters of selectAll for group element type and datum type do not match // Using selectAll(...) sub-selection with a selector function argument. @@ -232,18 +240,21 @@ gElementsOldData = svgEl.selectAll(svgGroupSelectorAll function wrongSvgGroupSelectorAll(this: HTMLElement, d: SVGDatum, i: number, groups: HTMLElement[]): NodeListOf { return this.querySelectorAll('g'); } -// gElementsOldData = svgEl.selectAll(wrongSvgGroupSelectorAll); // fails, wrong this context +// $ExpectError +gElementsOldData = svgEl.selectAll(wrongSvgGroupSelectorAll); // fails, wrong this context gElementsOldData = svgEl.selectAll(function() { const that: SVGSVGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch console.log('Get Element width using "this": ', this.width.baseVal.value); // 'this' type is SVGSVGElement return this.querySelectorAll('g'); // this of type SVGSVGElement by type inference }); gElementsOldData = svgEl.selectAll(function(d, i, g) { const that: SVGSVGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: SVGDatum = d; const index: number = i; const group: SVGSVGElement[] | d3Selection.ArrayLike = g; @@ -255,31 +266,32 @@ gElementsOldData = svgEl.selectAll(function(d, i, g) { return this.querySelectorAll('g'); }); -// gElementsOldData = svgEl.selectAll(function() { // fails, because Datum type is not compatible as selectAll defaults to 'any', but gElementsOldData expects CircleDatum -// return this.querySelectorAll('g'); -// }); - -// gElementsOldData = svgEl.selectAll(function() { // fails, return type HTMLAnchorElement is not compatible with SVGGElement expected by selectAll-typing -// return this.querySelectorAll('a'); -// }); +// $ExpectError +gElementsOldData = svgEl.selectAll(function() { // fails, return type HTMLAnchorElement is not compatible with SVGGElement expected by selectAll-typing + return this.querySelectorAll('a'); +}); elementsUnknownData = svgEl.selectAll(svgGroupSelectorAll); elementsUnknownData = svgEl.selectAll(function() { const that: SVGSVGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch console.log('Get Element width using "this": ', this.width.baseVal.value); // 'this' type is SVGSVGElement return this.querySelectorAll('g'); // this of type SVGSVGElement by type inference }); -// gElementsUnknownData = svgEl.selectAll(function() { // fails, return type HTMLAnchorElement is not compatible with SVGGElement -// return this.querySelectorAll('a'); -// }); +// $ExpectError +gElementsUnknownData = svgEl.selectAll(function() { // fails, return type HTMLAnchorElement is not compatible with SVGGElement + return this.querySelectorAll('a'); +}); maybeG.selectAll(function(d, i, g) { const that: SVGGElement | null = this; - // const that2: SVGGElement = this; // fails with strictNullChecks - // const that3: HTMLElement | null = this; // fails, type mismatch + // $ExpectError + const that2: SVGGElement = this; // fails with strictNullChecks + // $ExpectError + const that3: HTMLElement | null = this; // fails, type mismatch const datum: SVGDatum = d; const index: number = i; const group: Array | d3Selection.ArrayLike = g; @@ -290,11 +302,13 @@ maybeG.selectAll(function(d, i, g) { // selector(...) and selectorAll(...) ---------------------------------------------------- -// d3Selection.select(d3Selection.selector('g')); // fails, selector as argument to top-level select not supported +// $ExpectError +d3Selection.select(d3Selection.selector('g')); // fails, selector as argument to top-level select not supported // supported on sub-selection firstG = svgEl.select(d3Selection.selector('g')); // type parameter of select(...) inferred -// firstG = svgEl.select(d3Selection.selector('div')); // fails, select and selector mismatch +// $ExpectError +firstG = svgEl.select(d3Selection.selector('div')); // fails, select and selector mismatch gElementsOldData = svgEl.selectAll(d3Selection.selectorAll('g')); @@ -308,7 +322,8 @@ filteredGElements = gElementsOldData.filter('.top-level'); filteredGElements = gElementsOldData.filter(function(d, i, g) { const that: SVGGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatum = d; const index: number = i; const group: SVGGElement[] | d3Selection.ArrayLike = g; @@ -325,16 +340,18 @@ filteredGElements = gElementsOldData.filter(function(d, i, g) { let filteredGElements2: d3Selection.Selection; filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter('g'); -// filteredGElements2 = d3Selection.selectAll('.any-type').filter('g'); // fails without using narrowing generic on filter method +// $ExpectError +filteredGElements2 = d3Selection.selectAll('.any-type').filter('g'); // fails without using narrowing generic on filter method filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter(function() { const that: SVGElement = this; return that.tagName === 'g' || that.tagName === 'G'; }); -// filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter(function(){ -// const that: SVGElement = this; -// return that.tagName === 'g'|| that.tagName === 'G'; -// }); // fails without using narrowing generic on filter method +// $ExpectError +filteredGElements2 = d3Selection.selectAll('.any-svg-type').filter(function() { + const that: SVGElement = this; + return that.tagName === 'g' || that.tagName === 'G'; +}); // fails without using narrowing generic on filter method // matcher() ----------------------------------------------------------------------------- @@ -371,7 +388,8 @@ circles = d3Selection.selectAll('circl circles = circles // re-assignment test chaining return-type .attr('cx', function(d, i, g) { const that: SVGGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatum = d; const index: number = i; const group: SVGGElement[] | d3Selection.ArrayLike = g; @@ -395,7 +413,8 @@ divs = divs divs = divs .classed('zero-px-padding', function(d, i, g) { const that: HTMLDivElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: DivDatum = d; const index: number = i; const group: HTMLDivElement[] | d3Selection.ArrayLike = g; @@ -411,13 +430,15 @@ divs = divs divs = divs .style('background-color', 'blue') // string .style('hidden', false) // boolean - // .style('color', 'green', 'test') // fails, invalid priority value + // $ExpectError + .style('color', 'green', 'test') // fails, invalid priority value .style('color', 'green', 'important'); divs = divs .style('padding', function(d, i, g) { const that: HTMLDivElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: DivDatum = d; const index: number = i; const group: HTMLDivElement[] | d3Selection.ArrayLike = g; @@ -428,7 +449,8 @@ divs = divs return d.padding; // string return value }) .style('hidden', () => true, null) // boolean return + test: priority = null - // .style('color', function() { return 'green'; }, 'test') // fails, test: invalid priority value + // $ExpectError + .style('color', () => 'green', 'test') // fails, test: invalid priority value .style('color', () => 'green', 'important'); // boolean return + test: priority = 'important'; // property(...) Tests @@ -442,7 +464,8 @@ circles = circles circles = circles .property('__hitchhikersguide__', function(d, i, g) { const that: SVGCircleElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatumAlternative = d; const index: number = i; const group: SVGCircleElement[] | d3Selection.ArrayLike = g; @@ -466,7 +489,8 @@ body = body body = body .text(function(d, i, g) { const that: HTMLBodyElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; @@ -482,7 +506,8 @@ body = body body = body .html(function(d, i, g) { const that: HTMLBodyElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; @@ -521,13 +546,15 @@ let newBodyDatum: { newFoo: string }; newBodyDatum = body.datum({ newFoo: 'new foo' }).datum(); // inferred type -// body.datum({ newFoo: 'new foo' }); // fails, data type incompatible +// $ExpectError +body.datum({ newFoo: 'new foo' }); // fails, data type incompatible // function-based newBodyDatum = body.datum(function(d, i, g) { const that: HTMLBodyElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; @@ -536,10 +563,11 @@ newBodyDatum = body.datum(function(d, i, g) { return { newFoo: 'new foo' }; }).datum(); // inferred type -// newBodyDatum = body.datum(function(d) { // fails, data type incompatible with return value type -// console.log('HTML5 Custom Data Attributes of body: ', this.dataset); // this typings HTMLBodyElement -// return { newFoo: 'new foo' }; -// }).datum(); // inferred type +// $ExpectError +newBodyDatum = body.datum(function(d) { // fails, data type incompatible with return value type + console.log('HTML5 Custom Data Attributes of body: ', this.dataset); // this typings HTMLBodyElement + return { newFoo: 'new foo' }; +}).datum(); // inferred type // SCENARIO 1: Fully type-parameterized @@ -560,7 +588,8 @@ d3Selection.select('#svg-1') // irrelevant typing to get contextual typing in la .datum(data2) // new data type inferred .classed('has-transform-property', function(d, i, g) { const that: SVGGElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatumAlternative[] = d; const index: number = i; const group: SVGGElement[] | d3Selection.ArrayLike = g; @@ -569,14 +598,14 @@ d3Selection.select('#svg-1') // irrelevant typing to get contextual typing in la }); // below fails, as 'this' in .classed(...) will default to BaseType, which may be null and does not have 'transform' property - -// d3Selection.select('#svg-1') // irrelevant typing to get contextual typing in last step of chain -// .select('g.circles-group') // missing typing of selected DOM element for use in .classed(...) -// .datum(data2) // new data type inferred -// .classed('has-transform-property', function(d) { -// console.log('Color of first data element array', d.length > 0? d[0].color: 'Data array empty'); // CircleDatumAlternative type -// return this.transform !== undefined; -// }); +d3Selection.select('#svg-1') // irrelevant typing to get contextual typing in last step of chain + .select('g.circles-group') // missing typing of selected DOM element for use in .classed(...) + .datum(data2) // new data type inferred + .classed('has-transform-property', function(d) { + console.log('Color of first data element array', d.length > 0 ? d[0].color : 'Data array empty'); // CircleDatumAlternative type + // $ExpectError + return this.transform !== undefined; + }); // SCENARIO 3: Only inferred typing (To have datum-type in 'classed' method call, no need for DOM object access) @@ -585,7 +614,8 @@ d3Selection.select('#svg-1') // irrelevant typing to get contextual typing in la .datum(data2) // new data type inferred .classed('has-green-first-data-element', function(d, i, g) { const that: d3Selection.BaseType = this; - // const that2: Element = this; // fails, type mismatch + // $ExpectError + const that2: Element = this; // fails, type mismatch const datum: CircleDatumAlternative[] = d; const index: number = i; const group: d3Selection.BaseType[] | d3Selection.ArrayLike = g; @@ -663,7 +693,8 @@ circles2 = d3Selection.select('#svg2') circles2 = circles2 // returned update selection has the same type parameters as original selection, if data type is unchanged .data(endCircleData, d => d.nodeId); -// circles2.data(endCircleData, function(d) { return d.nodeId; }); // fails, forced data type parameter and data argument mismatch +// $ExpectError +circles2.data(endCircleData, (d) => d.nodeId); // fails, forced data type parameter and data argument mismatch // ENTER-selection ----------------------------------------------------------------- @@ -690,7 +721,8 @@ const exitCircles = circles2.exit(); // Note: need to re exitCircles .style('opacity', function(d, i, g) { const that: SVGCircleElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatumAlternative = d; const index: number = i; const group: SVGCircleElement[] | d3Selection.ArrayLike = g; @@ -702,12 +734,13 @@ exitCircles // Note: the alternative using only .exit() without typing, will fail, if access to datum properties is attempted. // If access to d is not required, the short-hand is acceptable e.g. circles2.exit().remove(); -// let exitCircles2 = circles2.exit(); // Note: Without explicit re-typing to the old data type, the data type default to '{}' -// exitCircles2 -// .style('opacity', function(d) { -// console.log('Circle Radius exit node: ', this.r.baseVal.value); -// return d.color === 'green' ? 1 : 0; // fails, as data type is defaulted to {}. If datum access is required, this should trigger the thought to type .exit<...> -// }); +const exitCircles2 = circles2.exit(); // Note: Without explicit re-typing to the old data type, the data type default to '{}' +exitCircles2 + .style('opacity', function(d) { + console.log('Circle Radius exit node: ', this.r.baseVal.value); + // $ExpectError + return d.color === 'green' ? 1 : 0; // fails, as data type is defaulted to {}. If datum access is required, this should trigger the thought to type .exit<...> + }); // MERGE ENTER + UPDATE ------------------------------------------------------------------ @@ -733,8 +766,8 @@ tr = d3Selection.select('body') .append('table') .selectAll() .data(matrix) - // .data([{test: 1}, {test: 2}]) // fails, using this data statement instead, would fail assignment to tr due to the data type of tr Selection - // .data([{test: 1}, {test: 2}]) // fails, using this data statement instead, would fail because of its type parameter not being met by input + // $ExpectError + .data([{test: 1}, {test: 2}]) // fails, using this data statement instead, would fail because of its type parameter not being met by input .enter().append('tr'); nMatrix = tr.data(); // i.e. matrix @@ -745,7 +778,6 @@ td = tr.selectAll() .enter().append('td') .text(function(d, i, g) { const that: HTMLTableDataCellElement = this; - // const that2: Element = this; // fails, type mismatch const datum: number = d; const index: number = i; const group: HTMLTableDataCellElement[] | d3Selection.ArrayLike = g; @@ -787,11 +819,13 @@ newDiv2 = body.append('div'); // using creator newDiv2 = body.append(d3Selection.creator('div')); -// newDiv2 = body.append(d3Selection.creator('div')); // fails, as creator returns BaseType element, but HTMLDivElement is expected. +// $ExpectError +newDiv2 = body.append(d3Selection.creator('div')); // fails, as creator returns BaseType element, but HTMLDivElement is expected. newDiv2 = body.append(function(d, i, g) { const that: HTMLBodyElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; @@ -799,13 +833,15 @@ newDiv2 = body.append(function(d, i, g) { return this.ownerDocument!.createElement('div'); // this-type HTMLBodyElement }); -// newDiv2 = body.append(function(d) { -// return this.ownerDocument.createElement('a'); // fails, HTMLDivElement expected by type parameter, HTMLAnchorElement returned -// }); +// $ExpectError +newDiv2 = body.append(function(d) { + return this.ownerDocument!.createElement('a'); // fails, HTMLDivElement expected by type parameter, HTMLAnchorElement returned +}); -// newDiv2 = body.append(function(d) { -// return this.ownerDocument.createElement('a'); // fails, HTMLDivElement expected by inference, HTMLAnchorElement returned -// }); +// $ExpectError +newDiv2 = body.append(function(d) { + return this.ownerDocument!.createElement('a'); // fails, HTMLDivElement expected by inference, HTMLAnchorElement returned +}); // create a detached element @@ -909,7 +945,8 @@ const size: number = gElementsOldData.size(); // returns 'this' selection circles = circles.each(function(d, i, g) { // check chaining return type by re-assigning const that: SVGCircleElement = this; - // const that2: HTMLElement = this; // fails, type mismatch + // $ExpectError + const that2: HTMLElement = this; // fails, type mismatch const datum: CircleDatum = d; const index: number = i; const group: SVGCircleElement[] | d3Selection.ArrayLike = g; @@ -931,13 +968,15 @@ function enforceMinRadius(selection: d3Selection.Selection):void { -// // fails, group element types of selection not compatible: SVGCircleElement v HTMLDivElement -// }); +// $ExpectError +circles.call((selection: d3Selection.Selection) => { + // fails, group element types of selection not compatible: SVGCircleElement v HTMLDivElement +}); -// circles.call(function(selection: d3Selection.Selection):void { -// // fails, group datum types of selection not compatible: CircleDatumAlternative v DivDatum -// }); +// $ExpectError +circles.call((selection: d3Selection.Selection) => { + // fails, group datum types of selection not compatible: CircleDatumAlternative v DivDatum +}); // --------------------------------------------------------------------------------------- // Tests of Event Handling @@ -949,7 +988,8 @@ let listener: undefined | ((this: HTMLBodyElement, datum: BodyDatum, index: numb body = body.on('click', function(d, i, g) { const that: HTMLBodyElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; @@ -981,7 +1021,8 @@ body = body.dispatch('fooEvent', fooEventParam); // re-assign for chaining test; body = body.dispatch('fooEvent', function(d, i, g) { // re-assign for chaining test; const that: HTMLBodyElement = this; - // const that2: SVGElement = this; // fails, type mismatch + // $ExpectError + const that2: SVGElement = this; // fails, type mismatch const datum: BodyDatum = d; const index: number = i; const group: HTMLBodyElement[] | d3Selection.ArrayLike = g; @@ -1016,11 +1057,16 @@ function customListener(this: HTMLBodyElement | null, finalOpponent: string): st const resultText: string = d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales'); -// let result = d3Selection.customEvent(successEvent, customListener, circles.nodes()[0], 'Wales'); // fails, incompatible 'this' context in call -// let resultValue: number = d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales'); // fails, incompatible return types -// d3Selection.customEvent(successEvent, customListener, circles.nodes()[0], 'Wales'); // fails, incompatible 'this' context in type parameter and call -// d3Selection.customEvent(successEvent, customListener, circles.nodes()[0], 'Wales'); // fails, incompatible 'this' context in type parameter and call -// d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales'); // fails, incompatible return types +// $ExpectError +const result = d3Selection.customEvent(successEvent, customListener, circles.nodes()[0], 'Wales'); // fails, incompatible 'this' context in call +// $ExpectError +const resultValue: number = d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales'); // fails, incompatible return types +// $ExpectError +d3Selection.customEvent(successEvent, customListener, circles.nodes()[0], 'Wales'); // fails, incompatible 'this' context in type parameter and call +// $ExpectError +d3Selection.customEvent(successEvent, customListener, circles.nodes()[0], 'Wales'); // fails, incompatible 'this' context in type parameter and call +// $ExpectError +d3Selection.customEvent(successEvent, customListener, body.node(), 'Wales'); // fails, incompatible return types // mouse() --------------------------------------------------------------------------------- diff --git a/types/d3-selection/index.d.ts b/types/d3-selection/index.d.ts index d9988636fd..9edcb4aac8 100644 --- a/types/d3-selection/index.d.ts +++ b/types/d3-selection/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for D3JS d3-selection module 1.3 // Project: https://github.com/d3/d3-selection/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Last module patch version validated against: 1.3.0 diff --git a/types/react-native-svg-charts/tslint.json b/types/react-native-svg-charts/tslint.json index c040aa7670..ca872cae09 100644 --- a/types/react-native-svg-charts/tslint.json +++ b/types/react-native-svg-charts/tslint.json @@ -1,6 +1,6 @@ { - "extends": "dtslint/dt.json", - "rules": { - "strict-export-declare-modifiers": false - } + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false + } } From adb0eb59ddd345a05495bf1cc30d5b733ab53b24 Mon Sep 17 00:00:00 2001 From: Kapil Sachdeva Date: Mon, 5 Nov 2018 13:31:42 -0600 Subject: [PATCH 0311/1121] dockerod - misc fixes and additional typings --- types/dockerode/index.d.ts | 1944 +++++++++++++++++++----------------- 1 file changed, 1036 insertions(+), 908 deletions(-) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index aa5d93858b..c0114bbfec 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -11,1008 +11,1136 @@ /// -import * as stream from 'stream'; -import * as events from 'events'; +import * as events from "events"; +import * as stream from "stream"; declare namespace Dockerode { - interface Container { - inspect(options: {}, callback: Callback): void; - inspect(callback: Callback): void; - inspect(options?: {}): Promise; + interface Container { + inspect(options: {}, callback: Callback): void; + inspect(callback: Callback): void; + inspect(options?: {}): Promise; + + rename(options: {}, callback: Callback): void; + rename(options: {}): Promise; + + update(options: {}, callback: Callback): void; + update(options: {}): Promise; + + top(options: {}, callback: Callback): void; + top(callback: Callback): void; + top(options?: {}): Promise; + + changes(callback: Callback): void; + changes(): Promise; + + export(callback: Callback): void; + export(): Promise; + + start(options: {}, callback: Callback): void; + start(callback: Callback): void; + start(options?: {}): Promise; + + pause(options: {}, callback: Callback): void; + pause(callback: Callback): void; + pause(options?: {}): Promise; + + unpause(options: {}, callback: Callback): void; + unpause(callback: Callback): void; + unpause(options?: {}): Promise; + + exec(options: {}, callback: Callback): void; + exec(options: {}): Promise; + + commit(options: {}, callback: Callback): void; + commit(callback: Callback): void; + commit(options?: {}): Promise; + + stop(options: {}, callback: Callback): void; + stop(callback: Callback): void; + stop(options?: {}): Promise; + + restart(options: {}, callback: Callback): void; + restart(callback: Callback): void; + restart(options?: {}): Promise; + + kill(options: {}, callback: Callback): void; + kill(callback: Callback): void; + kill(options?: {}): Promise; + + resize(options: {}, callback: Callback): void; + resize(callback: Callback): void; + resize(options?: {}): Promise; + + wait(callback: Callback): void; + wait(): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + /** Deprecated since RAPI v1.20 */ + copy(options: {}, callback: Callback): void; + /** Deprecated since RAPI v1.20 */ + copy(callback: Callback): void; + /** Deprecated since RAPI v1.20 */ + copy(options?: {}): Promise; + + getArchive( + options: {}, + callback: Callback + ): void; + getArchive(options: {}): Promise; + + infoArchive(options: {}, callback: Callback): void; + infoArchive(options: {}): Promise; + + /** @param file Filename (will read synchronously), Buffer or stream */ + putArchive( + file: string | Buffer | NodeJS.ReadableStream, + options: {}, + callback: Callback + ): void; + putArchive( + file: string | Buffer | NodeJS.ReadableStream, + options: {} + ): Promise; + + logs( + options: ContainerLogsOptions, + callback: Callback + ): void; + logs(callback: Callback): void; + logs(options?: ContainerLogsOptions): Promise; + + stats(options: {}, callback: Callback): void; + stats(callback: Callback): void; + stats(options?: {}): Promise; + + attach(options: {}, callback: Callback): void; + attach(options: {}): Promise; - rename(options: {}, callback: Callback): void; - rename(options: {}): Promise; + modem: any; + id?: string; + } - update(options: {}, callback: Callback): void; - update(options: {}): Promise; + interface Image { + inspect(callback: Callback): void; + inspect(): Promise; + + history(callback: Callback): void; + history(): Promise; - top(options: {}, callback: Callback): void; - top(callback: Callback): void; - top(options?: {}): Promise; - - changes(callback: Callback): void; - changes(): Promise; - - export(callback: Callback): void; - export(): Promise; - - start(options: {}, callback: Callback): void; - start(callback: Callback): void; - start(options?: {}): Promise; - - pause(options: {}, callback: Callback): void; - pause(callback: Callback): void; - pause(options?: {}): Promise; - - unpause(options: {}, callback: Callback): void; - unpause(callback: Callback): void; - unpause(options?: {}): Promise; - - exec(options: {}, callback: Callback): void; - exec(options: {}): Promise; - - commit(options: {}, callback: Callback): void; - commit(callback: Callback): void; - commit(options?: {}): Promise; - - stop(options: {}, callback: Callback): void; - stop(callback: Callback): void; - stop(options?: {}): Promise; - - restart(options: {}, callback: Callback): void; - restart(callback: Callback): void; - restart(options?: {}): Promise; - - kill(options: {}, callback: Callback): void; - kill(callback: Callback): void; - kill(options?: {}): Promise; - - resize(options: {}, callback: Callback): void; - resize(callback: Callback): void; - resize(options?: {}): Promise; - - wait(callback: Callback): void; - wait(): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - /** Deprecated since RAPI v1.20 */ - copy(options: {}, callback: Callback): void; - /** Deprecated since RAPI v1.20 */ - copy(callback: Callback): void; - /** Deprecated since RAPI v1.20 */ - copy(options?: {}): Promise; - - getArchive(options: {}, callback: Callback): void; - getArchive(options: {}): Promise; - - infoArchive(options: {}, callback: Callback): void; - infoArchive(options: {}): Promise; - - /** @param file Filename (will read synchronously), Buffer or stream */ - putArchive(file: string | Buffer | NodeJS.ReadableStream, options: {}, callback: Callback): void; - putArchive(file: string | Buffer | NodeJS.ReadableStream, options: {}): Promise; - - logs(options: ContainerLogsOptions, callback: Callback): void; - logs(callback: Callback): void; - logs(options?: ContainerLogsOptions): Promise; - - stats(options: {}, callback: Callback): void; - stats(callback: Callback): void; - stats(options?: {}): Promise; - - attach(options: {}, callback: Callback): void; - attach(options: {}): Promise; - - modem: any; - id?: string; - } - - interface Image { - inspect(callback: Callback): void; - inspect(): Promise; - - history(callback: Callback): void; - history(): Promise; - - get(callback: Callback): void; - get(): Promise; - - push(options: {}, callback: Callback): void; - push(callback: Callback): void; - push(options?: {}): Promise; - - tag(options: {}, callback: Callback): void; - tag(callback: Callback): void; - tag(options?: {}): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - modem: any; - id?: string; - } - - interface Volume { - inspect(callback: Callback): void; - inspect(): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - modem: any; - name?: string; - } - - interface Service { - inspect(callback: Callback): void; - inspect(): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - update(options: {}, callback: Callback): void; - update(options: {}): Promise; - - modem: any; - id?: string; - } - - interface Task { - inspect(callback: Callback): void; - inspect(): Promise; - - modem: any; - id?: string; - } - - interface Node { - inspect(callback: Callback): void; - inspect(): Promise; - - update(options: {}, callback: Callback): void; - update(callback: Callback): void; - update(options?: {}): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - modem: any; - id?: string; - } - - interface Plugin { - modem: any; - name: string; - remote: any; - - inspect(callback: Callback): void; - inspect(): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - privileges(callback: Callback): void; - privileges(): Promise; - - pull(options: {}, callback: Callback): void; - pull(options: {}): Promise; - - enable(options: {}, callback: Callback): void; - enable(callback: Callback): void; - enable(options?: {}): Promise; - - disable(options: {}, callback: Callback): void; - disable(callback: Callback): void; - disable(options?: {}): Promise; - - push(options: {}, callback: Callback): void; - push(callback: Callback): void; - push(options?: {}): Promise; - - configure(options: {}, callback: Callback): void; - configure(callback: Callback): void; - configure(options?: {}): Promise; - - upgrade(auth: any, options: {}, callback: Callback): void; - upgrade(auth: any, callback: Callback): void; - upgrade(auth: any, options?: {}): Promise; - } - - interface Secret { - inspect(callback: Callback): void; - inspect(): Promise; - - update(options: {}, callback: Callback): void; - update(callback: Callback): void; - update(options?: {}): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - modem: any; - id?: string; - } - - interface Network { - inspect(callback: Callback): void; - inspect(): Promise; - - remove(options: {}, callback: Callback): void; - remove(callback: Callback): void; - remove(options?: {}): Promise; - - connect(options: {}, callback: Callback): void; - connect(callback: Callback): void; - connect(options?: {}): Promise; - - disconnect(options: {}, callback: Callback): void; - disconnect(callback: Callback): void; - disconnect(options?: {}): Promise; - - modem: any; - id?: string; - } - - interface Exec { - inspect(callback: Callback): void; - inspect(): Promise; - - start(options: {}, callback: Callback): void; - start(options: {}): Promise; - - resize(options: {}, callback: Callback): void; - resize(options: {}): Promise; - - modem: any; - id?: string; - } - - interface ImageInfo { - Id: string; - ParentId: string; - RepoTags: string[]; - RepoDigests?: string[]; - Created: number; - Size: number; - VirtualSize: number; - Labels: { [label: string]: string }; - } - - interface ContainerInfo { - Id: string; - Names: string[]; - Image: string; - ImageID: string; - Command: string; - Created: number; - Ports: Port[]; - Labels: { [label: string]: string }; - State: string; - Status: string; - HostConfig: { - NetworkMode: string; - }; - NetworkSettings: { - Networks: { [networkType: string]: NetworkInfo } - }; - } - - interface Port { - IP: string; - PrivatePort: number; - PublicPort: number; - Type: string; - } - - interface NetworkInfo { - IPAMConfig?: any; - Links?: any; - Aliases?: any; - NetworkID: string; - EndpointID: string; - Gateway: string; - IPAddress: string; - IPPrefixLen: number; - IPv6Gateway: string; - GlobalIPv6Address: string; - GlobalIPv6PrefixLen: number; - MacAddress: string; - } - - interface ContainerInspectInfo { - Id: string; - Created: string; - Path: string; - Args: string[]; - State: { - Status: string; - Running: boolean; - Paused: boolean; - Restarting: boolean; - OOMKilled: boolean; - Dead: boolean; - Pid: number; - ExitCode: number; - Error: string; - StartedAt: string; - FinishedAt: string; - }; - Image: string; - ResolvConfPath: string; - HostnamePath: string; - HostsPath: string; - LogPath: string; - Name: string; - RestartCount: number; - Driver: string; - MountLabel: string; - ProcessLabel: string; - AppArmorProfile: string; - ExecIDs?: any; - HostConfig: HostConfig; - GraphDriver: { - Name: string; - Data: { - DeviceId: string; - DeviceName: string; - DeviceSize: string; - } - }; - Mounts: Array<{ - Source: string; - Destination: string; - Mode: string; - RW: boolean; - Propagation: string; - }>; - Config: { - Hostname: string; - Domainname: string; - User: string; - AttachStdin: boolean; - AttachStdout: boolean; - AttachStderr: boolean; - ExposedPorts: { [portAndProtocol: string]: {} }; - Tty: boolean; - OpenStdin: boolean; - StdinOnce: boolean; - Env: string[]; - Cmd: string[]; - Image: string; - Volumes: { [volume: string]: {} }; - WorkingDir: string; - Entrypoint?: any; - OnBuild?: any; - Labels: { [label: string]: string } - }; - NetworkSettings: { - Bridge: string; - SandboxID: string; - HairpinMode: boolean; - LinkLocalIPv6Address: string; - LinkLocalIPv6PrefixLen: number; - Ports: { - [portAndProtocol: string]: Array<{ - HostIp: string; - HostPort: string; + get(callback: Callback): void; + get(): Promise; + + push(options: {}, callback: Callback): void; + push(callback: Callback): void; + push(options?: {}): Promise; + + tag(options: {}, callback: Callback): void; + tag(callback: Callback): void; + tag(options?: {}): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + modem: any; + id?: string; + } + + interface Volume { + inspect(callback: Callback): void; + inspect(): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + modem: any; + name?: string; + } + + interface Service { + inspect(callback: Callback): void; + inspect(): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + update(options: {}, callback: Callback): void; + update(options: {}): Promise; + + modem: any; + id?: string; + } + + interface Task { + inspect(callback: Callback): void; + inspect(): Promise; + + modem: any; + id?: string; + } + + interface Node { + inspect(callback: Callback): void; + inspect(): Promise; + + update(options: {}, callback: Callback): void; + update(callback: Callback): void; + update(options?: {}): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + modem: any; + id?: string; + } + + interface Plugin { + modem: any; + name: string; + remote: any; + + inspect(callback: Callback): void; + inspect(): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + privileges(callback: Callback): void; + privileges(): Promise; + + pull(options: {}, callback: Callback): void; + pull(options: {}): Promise; + + enable(options: {}, callback: Callback): void; + enable(callback: Callback): void; + enable(options?: {}): Promise; + + disable(options: {}, callback: Callback): void; + disable(callback: Callback): void; + disable(options?: {}): Promise; + + push(options: {}, callback: Callback): void; + push(callback: Callback): void; + push(options?: {}): Promise; + + configure(options: {}, callback: Callback): void; + configure(callback: Callback): void; + configure(options?: {}): Promise; + + upgrade(auth: any, options: {}, callback: Callback): void; + upgrade(auth: any, callback: Callback): void; + upgrade(auth: any, options?: {}): Promise; + } + + interface Secret { + inspect(callback: Callback): void; + inspect(): Promise; + + update(options: {}, callback: Callback): void; + update(callback: Callback): void; + update(options?: {}): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + modem: any; + id?: string; + } + + interface Network { + inspect(callback: Callback): void; + inspect(): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + + connect(options: {}, callback: Callback): void; + connect(callback: Callback): void; + connect(options?: {}): Promise; + + disconnect(options: {}, callback: Callback): void; + disconnect(callback: Callback): void; + disconnect(options?: {}): Promise; + + modem: any; + id?: string; + } + + interface Exec { + inspect(callback: Callback): void; + inspect(): Promise; + + start(options: {}, callback: Callback): void; + start(options: {}): Promise; + + resize(options: {}, callback: Callback): void; + resize(options: {}): Promise; + + modem: any; + id?: string; + } + + interface ImageInfo { + Id: string; + ParentId: string; + RepoTags: string[]; + RepoDigests?: string[]; + Created: number; + Size: number; + VirtualSize: number; + Labels: { [label: string]: string }; + } + + interface ContainerInfo { + Id: string; + Names: string[]; + Image: string; + ImageID: string; + Command: string; + Created: number; + Ports: Port[]; + Labels: { [label: string]: string }; + State: string; + Status: string; + HostConfig: { NetworkMode: string }; + NetworkSettings: { Networks: { [networkType: string]: NetworkInfo } }; + } + + interface Port { + IP: string; + PrivatePort: number; + PublicPort: number; + Type: string; + } + + interface NetworkInfo { + IPAMConfig?: any; + Links?: any; + Aliases?: any; + NetworkID: string; + EndpointID: string; + Gateway: string; + IPAddress: string; + IPPrefixLen: number; + IPv6Gateway: string; + GlobalIPv6Address: string; + GlobalIPv6PrefixLen: number; + MacAddress: string; + } + + // not complete definition of network inspection + // info which is returned by list / inspect + interface NetworkInspectInfo { + Id: string; + Name: string; + Driver: string; + Created: string; + Scope: string; + EnableIPv6: boolean; + Internal: boolean; + Attachable: boolean; + Ingress: boolean; + } + + interface ContainerInspectInfo { + Id: string; + Created: string; + Path: string; + Args: string[]; + State: { + Status: string; + Running: boolean; + Paused: boolean; + Restarting: boolean; + OOMKilled: boolean; + Dead: boolean; + Pid: number; + ExitCode: number; + Error: string; + StartedAt: string; + FinishedAt: string; + }; + Image: string; + ResolvConfPath: string; + HostnamePath: string; + HostsPath: string; + LogPath: string; + Name: string; + RestartCount: number; + Driver: string; + MountLabel: string; + ProcessLabel: string; + AppArmorProfile: string; + ExecIDs?: any; + HostConfig: HostConfig; + GraphDriver: { + Name: string; + Data: { DeviceId: string; DeviceName: string; DeviceSize: string }; + }; + Mounts: Array<{ + Source: string; + Destination: string; + Mode: string; + RW: boolean; + Propagation: string; }>; - }; - SandboxKey: string; - SecondaryIPAddresses?: any; - SecondaryIPv6Addresses?: any; - EndpointID: string; - Gateway: string; - GlobalIPv6Address: string; - GlobalIPv6PrefixLen: number; - IPAddress: string; - IPPrefixLen: number; - IPv6Gateway: string; - MacAddress: string; - Networks: { - [type: string]: { - IPAMConfig?: any; - Links?: any; - Aliases?: any; - NetworkID: string; - EndpointID: string; - Gateway: string; - IPAddress: string; - IPPrefixLen: number; - IPv6Gateway: string; - GlobalIPv6Address: string; - GlobalIPv6PrefixLen: number; - MacAddress: string; - } - }; - Node?: { - ID: string; - IP: string; - Addr: string; - Name: string; - Cpus: number; - Memory: number; - Labels: any; - } - }; - } + Config: { + Hostname: string; + Domainname: string; + User: string; + AttachStdin: boolean; + AttachStdout: boolean; + AttachStderr: boolean; + ExposedPorts: { [portAndProtocol: string]: {} }; + Tty: boolean; + OpenStdin: boolean; + StdinOnce: boolean; + Env: string[]; + Cmd: string[]; + Image: string; + Volumes: { [volume: string]: {} }; + WorkingDir: string; + Entrypoint?: any; + OnBuild?: any; + Labels: { [label: string]: string }; + }; + NetworkSettings: { + Bridge: string; + SandboxID: string; + HairpinMode: boolean; + LinkLocalIPv6Address: string; + LinkLocalIPv6PrefixLen: number; + Ports: { + [portAndProtocol: string]: Array<{ + HostIp: string; + HostPort: string; + }>; + }; + SandboxKey: string; + SecondaryIPAddresses?: any; + SecondaryIPv6Addresses?: any; + EndpointID: string; + Gateway: string; + GlobalIPv6Address: string; + GlobalIPv6PrefixLen: number; + IPAddress: string; + IPPrefixLen: number; + IPv6Gateway: string; + MacAddress: string; + Networks: { + [type: string]: { + IPAMConfig?: any; + Links?: any; + Aliases?: any; + NetworkID: string; + EndpointID: string; + Gateway: string; + IPAddress: string; + IPPrefixLen: number; + IPv6Gateway: string; + GlobalIPv6Address: string; + GlobalIPv6PrefixLen: number; + MacAddress: string; + }; + }; + Node?: { + ID: string; + IP: string; + Addr: string; + Name: string; + Cpus: number; + Memory: number; + Labels: any; + }; + }; + } - interface HostConfig { - AutoRemove: boolean; - Binds: string[]; - ContainerIDFile: string; - LogConfig: { - Type: string; - Config: any; - }; - NetworkMode: string; - PortBindings?: any; - RestartPolicy: { - Name: string; - MaximumRetryCount: number; - }; - VolumeDriver: string; - VolumesFrom?: any; - CapAdd?: any; - CapDrop?: any; - Dns: any[]; - DnsOptions: any[]; - DnsSearch: any[]; - ExtraHosts?: any; - IpcMode: string; - Links?: any; - OomScoreAdj: number; - PidMode: string; - Privileged: boolean; - PublishAllPorts: boolean; - ReadonlyRootfs: boolean; - SecurityOpt?: any; - UTSMode: string; - ShmSize: number; - ConsoleSize: number[]; - Isolation: string; - CpuShares: number; - CgroupParent: string; - BlkioWeight: number; - BlkioWeightDevice?: any; - BlkioDeviceReadBps?: any; - BlkioDeviceWriteBps?: any; - BlkioDeviceReadIOps?: any; - BlkioDeviceWriteIOps?: any; - CpuPeriod: number; - CpuQuota: number; - CpusetCpus: string; - CpusetMems: string; - Devices?: any; - DiskQuota: number; - KernelMemory: number; - Memory: number; - MemoryReservation: number; - MemorySwap: number; - MemorySwappiness: number; - OomKillDisable: boolean; - PidsLimit: number; - Ulimits?: any; - } + interface HostConfig { + AutoRemove: boolean; + Binds: string[]; + ContainerIDFile: string; + LogConfig: { Type: string; Config: any }; + NetworkMode: string; + PortBindings?: any; + RestartPolicy: { Name: string; MaximumRetryCount: number }; + VolumeDriver: string; + VolumesFrom?: any; + CapAdd?: any; + CapDrop?: any; + Dns: any[]; + DnsOptions: any[]; + DnsSearch: any[]; + ExtraHosts?: any; + IpcMode: string; + Links?: any; + OomScoreAdj: number; + PidMode: string; + Privileged: boolean; + PublishAllPorts: boolean; + ReadonlyRootfs: boolean; + SecurityOpt?: any; + UTSMode: string; + ShmSize: number; + ConsoleSize: number[]; + Isolation: string; + CpuShares: number; + CgroupParent: string; + BlkioWeight: number; + BlkioWeightDevice?: any; + BlkioDeviceReadBps?: any; + BlkioDeviceWriteBps?: any; + BlkioDeviceReadIOps?: any; + BlkioDeviceWriteIOps?: any; + CpuPeriod: number; + CpuQuota: number; + CpusetCpus: string; + CpusetMems: string; + Devices?: any; + DiskQuota: number; + KernelMemory: number; + Memory: number; + MemoryReservation: number; + MemorySwap: number; + MemorySwappiness: number; + OomKillDisable: boolean; + PidsLimit: number; + Ulimits?: any; + } - interface ImageInspectInfo { - Id: string; - RepoTags: string[]; - RepoDigests: string[]; - Parent: string; - Comment: string; - Created: string; - Container: string; - ContainerConfig: - { - Hostname: string; - Domainname: string; - User: string; - AttachStdin: boolean; - AttachStdout: boolean; - AttachStderr: boolean; - ExposedPorts: { [portAndProtocol: string]: {} }; - Tty: boolean; - OpenStdin: boolean; - StdinOnce: boolean; - Env: string[]; - Cmd: string[]; - ArgsEscaped: boolean; - Image: string; - Volumes: { [path: string]: {} }, - WorkingDir: string; - Entrypoint?: any; - OnBuild?: any[]; - Labels: { [label: string]: string } - }; - DockerVersion: string; - Author: string; - Config: - { - Hostname: string; - Domainname: string; - User: string; - AttachStdin: boolean; - AttachStdout: boolean; - AttachStderr: boolean; - ExposedPorts: { [portAndProtocol: string]: {} } - Tty: boolean; - OpenStdin: boolean; - StdinOnce: boolean; - Env: string[]; - Cmd: string[]; - ArgsEscaped: boolean; - Image: string; - Volumes: { [path: string]: {} }, - WorkingDir: string; - Entrypoint?: any; - OnBuild: any[]; - Labels: { [label: string]: string } - }; - Architecture: string; - Os: string; - Size: number; - VirtualSize: number; - GraphDriver: - { - Name: string; - Data: - { - DeviceId: string; - DeviceName: string; - DeviceSize: string; - } - }; - } + interface ImageInspectInfo { + Id: string; + RepoTags: string[]; + RepoDigests: string[]; + Parent: string; + Comment: string; + Created: string; + Container: string; + ContainerConfig: { + Hostname: string; + Domainname: string; + User: string; + AttachStdin: boolean; + AttachStdout: boolean; + AttachStderr: boolean; + ExposedPorts: { [portAndProtocol: string]: {} }; + Tty: boolean; + OpenStdin: boolean; + StdinOnce: boolean; + Env: string[]; + Cmd: string[]; + ArgsEscaped: boolean; + Image: string; + Volumes: { [path: string]: {} }; + WorkingDir: string; + Entrypoint?: any; + OnBuild?: any[]; + Labels: { [label: string]: string }; + }; + DockerVersion: string; + Author: string; + Config: { + Hostname: string; + Domainname: string; + User: string; + AttachStdin: boolean; + AttachStdout: boolean; + AttachStderr: boolean; + ExposedPorts: { [portAndProtocol: string]: {} }; + Tty: boolean; + OpenStdin: boolean; + StdinOnce: boolean; + Env: string[]; + Cmd: string[]; + ArgsEscaped: boolean; + Image: string; + Volumes: { [path: string]: {} }; + WorkingDir: string; + Entrypoint?: any; + OnBuild: any[]; + Labels: { [label: string]: string }; + }; + Architecture: string; + Os: string; + Size: number; + VirtualSize: number; + GraphDriver: { + Name: string; + Data: { DeviceId: string; DeviceName: string; DeviceSize: string }; + }; + } - interface ContainerCreateOptions { - name?: string; - Hostname?: string; - Domainname?: string; - User?: string; - AttachStdin?: boolean; - AttachStdout?: boolean; - AttachStderr?: boolean; - Tty?: boolean; - OpenStdin?: boolean; - StdinOnce?: boolean; - Env?: string[]; - Cmd?: string[]; - Entrypoint?: string; - Image?: string; - Labels?: { [label: string]: string }; - Volumes?: { [volume: string]: {} }; - WorkingDir?: string; - NetworkDisabled?: boolean; - MacAddress?: boolean; - ExposedPorts?: { [port: string]: {} }; - StopSignal?: string; - HostConfig?: { - AutoRemove?: boolean; - Binds?: string[]; - Links?: string[]; - Memory?: number; - MemorySwap?: number; - MemoryReservation?: number; - KernelMemory?: number; - CpuPercent?: number; - CpuShares?: number; - CpuPeriod?: number; - CpuQuota?: number; - CpusetMems?: string; - MaximumIOps?: number; - MaxmimumIOBps?: number; - BlkioWeightDevice?: Array<{}>; - BlkioDeviceReadBps?: Array<{}>; - BlkioDeviceReadIOps?: Array<{}>; - BlkioDeviceWriteBps?: Array<{}>; - BlkioDeviceWriteIOps?: Array<{}>; - MemorySwappiness?: number; - OomKillDisable?: boolean; - OomScoreAdj?: number; - PidMode?: string; - PidsLimit?: number; - PortBindings?: { [portAndProtocol: string]: Array<{ [index: string]: string }> }; - PublishAllPorts?: boolean; - Privileged?: boolean; - ReadonlyRootfs?: boolean; - Dns?: string[]; - DnsOptions?: string[]; - DnsSearch?: string[]; - ExtraHosts?: any; - VolumesFrom?: string[]; - CapAdd?: string[]; - CapDrop?: string[]; - GroupAdd?: string[]; - RestartPolicy?: { [index: string]: number | string }; - NetworkMode?: string; - Devices?: any[]; - Sysctls?: { [index: string]: string }; - Ulimits?: Array<{}>; - LogConfig?: { [index: string]: string | {} }; - SecurityOpt?: { [index: string]: any }; - CgroupParent?: string; - VolumeDriver?: string; - ShmSize?: number; - }; - NetworkingConfig?: { - EndpointsConfig?: { - [index: string]: any; - isolated_nw?: { - [index: string]: any; - IPAMConfig?: { - IPv4Address?: string; - IPv6Adress?: string; - LinkLocalIPs?: string[]; - } - Links?: string[]; - Aliases?: string[]; - } - } - }; - } + interface PortBinding { + HostIp?: string; + HostPort?: string; + } - interface KeyObject { - pem: string | Buffer; - passphrase?: string; - } + interface PortMap { + [key: string]: PortBinding[]; + } - interface DockerOptions { - socketPath?: string; - host?: string; - port?: number | string; - ca?: string | string[] | Buffer | Buffer[]; - cert?: string | string[] | Buffer | Buffer[]; - key?: string | string[] | Buffer | Buffer[] | KeyObject[]; - protocol?: "https" | "http"; - timeout?: number; - version?: string; - Promise?: typeof Promise; - } + interface RestartPolicy { + Name: string; + MaximumRetryCount?: number; + } - interface SecretVersion { - Index: number; - } + type LoggingDriverType = + | "json-file" + | "syslog" + | "journald" + | "gelf" + | "fluentd" + | "awslogs" + | "splunk" + | "etwlogs" + | "none"; - interface ServiceSpec { - Name: string; - } + interface LogConfig { + Type: LoggingDriverType; + Config?: { [key: string]: string }; + } - interface SecretInfo { - ID: string; - Version: SecretVersion; - CreatedAt: string; - UpdatedAt?: string; - Spec?: ServiceSpec; - } + interface DeviceMapping { + PathOnHost: string; + PathinContainer: string; + CgroupPermissions: string; + } - interface PluginInfo { - Id?: string; - Name: string; - Enabled: boolean; - Settings: PluginSettings; - PluginReference?: string; - Config: PluginConfig; - } + interface ContainerCreateOptions { + name?: string; + Hostname?: string; + Domainname?: string; + User?: string; + AttachStdin?: boolean; + AttachStdout?: boolean; + AttachStderr?: boolean; + Tty?: boolean; + OpenStdin?: boolean; + StdinOnce?: boolean; + Env?: string[]; + Cmd?: string[]; + Entrypoint?: string; + Image?: string; + Labels?: { [label: string]: string }; + Volumes?: { [volume: string]: {} }; + WorkingDir?: string; + NetworkDisabled?: boolean; + MacAddress?: boolean; + ExposedPorts?: { [port: string]: {} }; + StopSignal?: string; + HostConfig?: { + AutoRemove?: boolean; + Binds?: string[]; + Links?: string[]; + Memory?: number; + MemorySwap?: number; + MemoryReservation?: number; + KernelMemory?: number; + CpuPercent?: number; + CpuShares?: number; + CpuPeriod?: number; + CpuQuota?: number; + CpusetMems?: string; + MaximumIOps?: number; + MaxmimumIOBps?: number; + BlkioWeightDevice?: Array<{}>; + BlkioDeviceReadBps?: Array<{}>; + BlkioDeviceReadIOps?: Array<{}>; + BlkioDeviceWriteBps?: Array<{}>; + BlkioDeviceWriteIOps?: Array<{}>; + MemorySwappiness?: number; + OomKillDisable?: boolean; + OomScoreAdj?: number; + PidMode?: string; + PidsLimit?: number; + PortBindings?: PortMap; + PublishAllPorts?: boolean; + Privileged?: boolean; + ReadonlyRootfs?: boolean; + Dns?: string[]; + DnsOptions?: string[]; + DnsSearch?: string[]; + ExtraHosts?: any; + VolumesFrom?: string[]; + CapAdd?: string[]; + CapDrop?: string[]; + GroupAdd?: string[]; + RestartPolicy?: RestartPolicy; + NetworkMode?: string; + Devices?: DeviceMapping[]; + Sysctls?: { [index: string]: string }; + Ulimits?: Array<{}>; + LogConfig?: LogConfig; + SecurityOpt?: { [index: string]: any }; + CgroupParent?: string; + VolumeDriver?: string; + ShmSize?: number; + }; + NetworkingConfig?: { + EndpointsConfig?: { + [index: string]: any; + isolated_nw?: { + [index: string]: any; + IPAMConfig?: { + IPv4Address?: string; + IPv6Adress?: string; + LinkLocalIPs?: string[]; + }; + Links?: string[]; + Aliases?: string[]; + }; + }; + }; + } - type PluginInspectInfo = PluginInfo; + interface KeyObject { + pem: string | Buffer; + passphrase?: string; + } - interface PluginSettings { - Mounts: PluginMount[]; - Env: string[]; - Args: string[]; - Devices: PluginDevice[]; - } + interface DockerOptions { + socketPath?: string; + host?: string; + port?: number | string; + ca?: string | string[] | Buffer | Buffer[]; + cert?: string | string[] | Buffer | Buffer[]; + key?: string | string[] | Buffer | Buffer[] | KeyObject[]; + protocol?: "https" | "http"; + timeout?: number; + version?: string; + Promise?: typeof Promise; + } - interface PluginConfig { - Description: string; - Documentation: string; - Interface: any; - Entrypoint: string[]; - WorkDir: string; - User?: User; - Network: Network; - Linux: Linux; - PropagatedMount: string; - Mounts: PluginMount[]; - Env: PluginEnv[]; - Args: Args; - rootfs: any; - } + interface SecretVersion { + Index: number; + } - interface Interface { - Types: PluginInterfaceType[]; - Socket: string; - } + interface ServiceSpec { + Name: string; + } - interface PluginInterfaceType { - Prefix: string; - Capability: string; - Version: string; - } + interface SecretInfo { + ID: string; + Version: SecretVersion; + CreatedAt: string; + UpdatedAt?: string; + Spec?: ServiceSpec; + } - interface PluginMount { - Name: string; - Description: string; - Settable: string[]; - Source: string; - Destination: string; - Type: string; - Options: string[]; - } + interface PluginInfo { + Id?: string; + Name: string; + Enabled: boolean; + Settings: PluginSettings; + PluginReference?: string; + Config: PluginConfig; + } - interface Linux { - Capabilities: string[]; - AllowAllDevices: boolean; - Devices: PluginDevice[]; - } + type PluginInspectInfo = PluginInfo; - interface PluginDevice { - Name: string; - Description: string; - Settable: string[]; - Path: string; - } + interface PluginSettings { + Mounts: PluginMount[]; + Env: string[]; + Args: string[]; + Devices: PluginDevice[]; + } - interface Network { - Type: string; - } + interface PluginConfig { + Description: string; + Documentation: string; + Interface: any; + Entrypoint: string[]; + WorkDir: string; + User?: User; + Network: Network; + Linux: Linux; + PropagatedMount: string; + Mounts: PluginMount[]; + Env: PluginEnv[]; + Args: Args; + rootfs: any; + } - interface PluginEnv { - Name: string; - Description: string; - Settable: string[]; - Value: string; - } + interface Interface { + Types: PluginInterfaceType[]; + Socket: string; + } - interface Args { - Name: string; - Description: string; - Settable: string[]; - Value: string; - } + interface PluginInterfaceType { + Prefix: string; + Capability: string; + Version: string; + } - interface User { - UID: number; - GID: number; - } + interface PluginMount { + Name: string; + Description: string; + Settable: string[]; + Source: string; + Destination: string; + Type: string; + Options: string[]; + } - interface ImageRemoveInfo { - Untagged: string; - Deleted: string; - } + interface Linux { + Capabilities: string[]; + AllowAllDevices: boolean; + Devices: PluginDevice[]; + } - interface PruneImagesInfo { - ImagesDeleted: ImageRemoveInfo[]; - SpaceReclaimed: number; - } + interface PluginDevice { + Name: string; + Description: string; + Settable: string[]; + Path: string; + } - interface PruneVolumesInfo { - VolumesDeleted: string[]; - SpaceReclaimed: number; - } + interface Network { + Type: string; + } - interface PruneContainersInfo { - ContainersDeleted: string[]; - SpaceReclaimed: number; - } + interface PluginEnv { + Name: string; + Description: string; + Settable: string[]; + Value: string; + } - interface PruneNetworksInfo { - NetworksDeleted: string[]; - } + interface Args { + Name: string; + Description: string; + Settable: string[]; + Value: string; + } - interface ContainerLogsOptions { - stdout?: boolean; - stderr?: boolean; - follow?: boolean; - since?: number; - details?: boolean; - tail?: number; - timestamps?: boolean; - } + interface User { + UID: number; + GID: number; + } - interface ImageBuildContext { - context: string; - src: string[]; - } + interface ImageRemoveInfo { + Untagged: string; + Deleted: string; + } - interface DockerVersion { - ApiVersion: string; - Arch: string; - BuildTime: Date; - Components: Array<{ - Details: { + interface PruneImagesInfo { + ImagesDeleted: ImageRemoveInfo[]; + SpaceReclaimed: number; + } + + interface PruneVolumesInfo { + VolumesDeleted: string[]; + SpaceReclaimed: number; + } + + interface PruneContainersInfo { + ContainersDeleted: string[]; + SpaceReclaimed: number; + } + + interface PruneNetworksInfo { + NetworksDeleted: string[]; + } + + interface ContainerLogsOptions { + stdout?: boolean; + stderr?: boolean; + follow?: boolean; + since?: number; + details?: boolean; + tail?: number; + timestamps?: boolean; + } + + interface ImageBuildContext { + context: string; + src: string[]; + } + + interface DockerVersion { ApiVersion: string; Arch: string; - BuilTime: Date; - Experimental: string; + BuildTime: Date; + Components: Array<{ + Details: { + ApiVersion: string; + Arch: string; + BuilTime: Date; + Experimental: string; + GitCommit: string; + GoVersion: string; + KernelVersion: string; + Os: string; + }; + Name: string; + Version: string; + }>; GitCommit: string; GoVersion: string; KernelVersion: string; + MinAPIVersion: string; Os: string; - }; - Name: string; - Version: string; - }>; - GitCommit: string; - GoVersion: string; - KernelVersion: string; - MinAPIVersion: string; - Os: string; - Platform: { - Name: string; - }; - Version: string; - } + Platform: { Name: string }; + Version: string; + } } type Callback = (error?: any, result?: T) => void; declare class Dockerode { - constructor(options?: Dockerode.DockerOptions); + constructor(options?: Dockerode.DockerOptions); - createContainer(options: Dockerode.ContainerCreateOptions, callback: Callback): void; - createContainer(options: Dockerode.ContainerCreateOptions): Promise; + createContainer( + options: Dockerode.ContainerCreateOptions, + callback: Callback + ): void; + createContainer( + options: Dockerode.ContainerCreateOptions + ): Promise; - createImage(options: {}, callback: Callback): void; - createImage(auth: any, options: {}, callback: Callback): void; - createImage(options: {}): Promise; - createImage(auth: any, options: {}): Promise; + createImage(options: {}, callback: Callback): void; + createImage( + auth: any, + options: {}, + callback: Callback + ): void; + createImage(options: {}): Promise; + createImage(auth: any, options: {}): Promise; - loadImage(file: string | NodeJS.ReadableStream, options: {}, callback: Callback): void; - loadImage(file: string | NodeJS.ReadableStream, callback: Callback): void; - loadImage(file: string | NodeJS.ReadableStream, options?: {}): Promise; + loadImage( + file: string | NodeJS.ReadableStream, + options: {}, + callback: Callback + ): void; + loadImage( + file: string | NodeJS.ReadableStream, + callback: Callback + ): void; + loadImage( + file: string | NodeJS.ReadableStream, + options?: {} + ): Promise; - importImage(file: string | NodeJS.ReadableStream, options: {}, callback: Callback): void; - importImage(file: string | NodeJS.ReadableStream, callback: Callback): void; - importImage(file: string | NodeJS.ReadableStream, options?: {}): Promise; + importImage( + file: string | NodeJS.ReadableStream, + options: {}, + callback: Callback + ): void; + importImage( + file: string | NodeJS.ReadableStream, + callback: Callback + ): void; + importImage( + file: string | NodeJS.ReadableStream, + options?: {} + ): Promise; - checkAuth(options: any, callback: Callback): void; - checkAuth(options: any): Promise; + checkAuth(options: any, callback: Callback): void; + checkAuth(options: any): Promise; - buildImage(file: string | NodeJS.ReadableStream | Dockerode.ImageBuildContext, options: {}, callback: Callback): void; - buildImage(file: string | NodeJS.ReadableStream | Dockerode.ImageBuildContext, callback: Callback): void; - buildImage(file: string | NodeJS.ReadableStream | Dockerode.ImageBuildContext, options?: {}): Promise; + buildImage( + file: string | NodeJS.ReadableStream | Dockerode.ImageBuildContext, + options: {}, + callback: Callback + ): void; + buildImage( + file: string | NodeJS.ReadableStream | Dockerode.ImageBuildContext, + callback: Callback + ): void; + buildImage( + file: string | NodeJS.ReadableStream | Dockerode.ImageBuildContext, + options?: {} + ): Promise; - getContainer(id: string): Dockerode.Container; + getContainer(id: string): Dockerode.Container; - getImage(name: string): Dockerode.Image; + getImage(name: string): Dockerode.Image; - getVolume(name: string): Dockerode.Volume; + getVolume(name: string): Dockerode.Volume; - getPlugin(name: string, remote: any): Dockerode.Plugin; + getPlugin(name: string, remote: any): Dockerode.Plugin; - getService(id: string): Dockerode.Service; + getService(id: string): Dockerode.Service; - getTask(id: string): Dockerode.Task; + getTask(id: string): Dockerode.Task; - getNode(id: string): Dockerode.Node; + getNode(id: string): Dockerode.Node; - getNetwork(id: string): Dockerode.Network; + getNetwork(id: string): Dockerode.Network; - getSecret(id: string): Dockerode.Secret; + getSecret(id: string): Dockerode.Secret; - getExec(id: string): Dockerode.Exec; + getExec(id: string): Dockerode.Exec; - listContainers(options: {}, callback: Callback): void; - listContainers(callback: Callback): void; - listContainers(options?: {}): Promise; + listContainers( + options: {}, + callback: Callback + ): void; + listContainers(callback: Callback): void; + listContainers(options?: {}): Promise; - listImages(options: {}, callback: Callback): void; - listImages(callback: Callback): void; - listImages(options?: {}): Promise; + listImages(options: {}, callback: Callback): void; + listImages(callback: Callback): void; + listImages(options?: {}): Promise; - listServices(options: {}, callback: Callback): void; - listServices(callback: Callback): void; - listServices(options?: {}): Promise; + listServices(options: {}, callback: Callback): void; + listServices(callback: Callback): void; + listServices(options?: {}): Promise; - listNodes(options: {}, callback: Callback): void; - listNodes(callback: Callback): void; - listNodes(options?: {}): Promise; + listNodes(options: {}, callback: Callback): void; + listNodes(callback: Callback): void; + listNodes(options?: {}): Promise; - listTasks(options: {}, callback: Callback): void; - listTasks(callback: Callback): void; - listTasks(options?: {}): Promise; + listTasks(options: {}, callback: Callback): void; + listTasks(callback: Callback): void; + listTasks(options?: {}): Promise; - listSecrets(options: {}, callback: Callback): void; - listSecrets(callback: Callback): void; - listSecrets(options?: {}): Promise; + listSecrets(options: {}, callback: Callback): void; + listSecrets(callback: Callback): void; + listSecrets(options?: {}): Promise; - listPlugins(options: {}, callback: Callback): void; - listPlugins(callback: Callback): void; - listPlugins(options?: {}): Promise; + listPlugins(options: {}, callback: Callback): void; + listPlugins(callback: Callback): void; + listPlugins(options?: {}): Promise; - listVolumes(options: {}, callback: Callback): void; - listVolumes(callback: Callback): void; - listVolumes(options?: {}): Promise; + listVolumes(options: {}, callback: Callback): void; + listVolumes(callback: Callback): void; + listVolumes(options?: {}): Promise; - listNetworks(options: {}, callback: Callback): void; - listNetworks(callback: Callback): void; - listNetworks(options?: {}): Promise; + listNetworks(options: {}, callback: Callback): void; + listNetworks(callback: Callback): void; + listNetworks(options?: {}): Promise; - createSecret(options: {}, callback: Callback): void; - createSecret(options: {}): Promise; + createSecret(options: {}, callback: Callback): void; + createSecret(options: {}): Promise; - createPlugin(options: {}, callback: Callback): void; - createPlugin(options: {}): Promise; + createPlugin(options: {}, callback: Callback): void; + createPlugin(options: {}): Promise; - createVolume(options: {}, callback: Callback): void; - createVolume(options: {}): Promise; + createVolume(options: {}, callback: Callback): void; + createVolume(options: {}): Promise; - createService(options: {}, callback: Callback): void; - createService(options: {}): Promise; + createService(options: {}, callback: Callback): void; + createService(options: {}): Promise; - createNetwork(options: {}, callback: Callback): void; - createNetwork(options: {}): Promise; + createNetwork(options: {}, callback: Callback): void; + createNetwork(options: {}): Promise; - searchImages(options: {}, callback: Callback): void; - searchImages(options: {}): Promise; + searchImages(options: {}, callback: Callback): void; + searchImages(options: {}): Promise; - pruneImages(options: {}, callback: Callback): void; - pruneImages(callback: Callback): void; - pruneImages(options?: {}): Promise; + pruneImages( + options: {}, + callback: Callback + ): void; + pruneImages(callback: Callback): void; + pruneImages(options?: {}): Promise; - pruneContainers(options: {}, callback: Callback): void; - pruneContainers(callback: Callback): void; - pruneContainers(options?: {}): Promise; + pruneContainers( + options: {}, + callback: Callback + ): void; + pruneContainers(callback: Callback): void; + pruneContainers(options?: {}): Promise; - pruneVolumes(options: {}, callback: Callback): void; - pruneVolumes(callback: Callback): void; - pruneVolumes(options?: {}): Promise; + pruneVolumes( + options: {}, + callback: Callback + ): void; + pruneVolumes(callback: Callback): void; + pruneVolumes(options?: {}): Promise; - pruneNetworks(options: {}, callback: Callback): void; - pruneNetworks(callback: Callback): void; - pruneNetworks(options?: {}): Promise; + pruneNetworks( + options: {}, + callback: Callback + ): void; + pruneNetworks(callback: Callback): void; + pruneNetworks(options?: {}): Promise; - info(callback: Callback): void; - info(): Promise; + info(callback: Callback): void; + info(): Promise; - df(callback: Callback): void; - df(): Promise; + df(callback: Callback): void; + df(): Promise; - version(callback: Callback): void; - version(): Promise; + version(callback: Callback): void; + version(): Promise; - ping(callback: Callback): void; - ping(): Promise; + ping(callback: Callback): void; + ping(): Promise; - getEvents(options: {}, callback: Callback): void; - getEvents(callback: Callback): void; - getEvents(options?: {}): Promise; + getEvents(options: {}, callback: Callback): void; + getEvents(callback: Callback): void; + getEvents(options?: {}): Promise; - pull(repoTag: string, options: {}, callback: Callback, auth?: {}): Dockerode.Image; - pull(repoTag: string, options: {}, auth?: {}): Promise; + pull( + repoTag: string, + options: {}, + callback: Callback, + auth?: {} + ): Dockerode.Image; + pull(repoTag: string, options: {}, auth?: {}): Promise; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], createOptions: {}, startOptions: {}, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], startOptions: {}, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], createOptions: {}, callback: Callback): events.EventEmitter; - run(image: string, cmd: string[], outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], createOptions?: {}, startOptions?: {}): Promise; + run( + image: string, + cmd: string[], + outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], + createOptions: {}, + startOptions: {}, + callback: Callback + ): events.EventEmitter; + run( + image: string, + cmd: string[], + outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], + startOptions: {}, + callback: Callback + ): events.EventEmitter; + run( + image: string, + cmd: string[], + outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], + callback: Callback + ): events.EventEmitter; + run( + image: string, + cmd: string[], + outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], + createOptions: {}, + callback: Callback + ): events.EventEmitter; + run( + image: string, + cmd: string[], + outputStream: NodeJS.WritableStream | NodeJS.WritableStream[], + createOptions?: {}, + startOptions?: {} + ): Promise; - swarmInit(options: {}, callback: Callback): void; - swarmInit(options: {}): Promise; + swarmInit(options: {}, callback: Callback): void; + swarmInit(options: {}): Promise; - swarmJoin(options: {}, callback: Callback): void; - swarmJoin(options: {}): Promise; + swarmJoin(options: {}, callback: Callback): void; + swarmJoin(options: {}): Promise; - swarmLeave(options: {}, callback: Callback): void; - swarmLeave(options: {}): Promise; + swarmLeave(options: {}, callback: Callback): void; + swarmLeave(options: {}): Promise; - swarmUpdate(options: {}, callback: Callback): void; - swarmUpdate(options: {}): Promise; + swarmUpdate(options: {}, callback: Callback): void; + swarmUpdate(options: {}): Promise; - swarmInspect(callback: Callback): void; - swarmInspect(): Promise; + swarmInspect(callback: Callback): void; + swarmInspect(): Promise; - modem: any; + modem: any; } export = Dockerode; From 31ddd01c073107a2970f5af7f3c19a97a99b7b20 Mon Sep 17 00:00:00 2001 From: Dan Dean Date: Mon, 5 Nov 2018 12:11:22 -0800 Subject: [PATCH 0312/1121] Fix the signaure of @storybook/react .add() method The `add` method takes an optional 3rd `paramters` option which is used to configure globally installed addons for the current story. --- types/storybook__react/index.d.ts | 3 ++- types/storybook__react/storybook__react-tests.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/storybook__react/index.d.ts b/types/storybook__react/index.d.ts index 3aa3445f61..91b686ffcf 100644 --- a/types/storybook__react/index.d.ts +++ b/types/storybook__react/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: Joscha Feth // Anton Izmailov +// Dan Dean // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -16,7 +17,7 @@ export type StoryDecorator = (story: RenderFunction, context: { kind: string, st export interface Story { readonly kind: string; - add(storyName: string, callback: RenderFunction): this; + add(storyName: string, callback: RenderFunction, parameters?: { [key: string]: any }): this; addDecorator(decorator: StoryDecorator): this; } diff --git a/types/storybook__react/storybook__react-tests.tsx b/types/storybook__react/storybook__react-tests.tsx index 12edecb219..ba19df798e 100644 --- a/types/storybook__react/storybook__react-tests.tsx +++ b/types/storybook__react/storybook__react-tests.tsx @@ -30,6 +30,7 @@ storiesOf('withAnyAddon', module) .addWithSideEffect('more', () =>
) .add('another story', () =>
) .add('to Storybook as Array', () => [
,
]) + .add('and a story with additional parameters', () =>
, { parameter: 'foo' }) .addWithSideEffect('even more', () =>
); // configure From feee4f8c4060c78b840897a5e674bbb79b40b836 Mon Sep 17 00:00:00 2001 From: Dan Dean Date: Mon, 5 Nov 2018 12:23:00 -0800 Subject: [PATCH 0313/1121] =?UTF-8?q?Bump=20from=20@storybook/react=203.0?= =?UTF-8?q?=20=E2=86=92=203.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/storybook__react/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/storybook__react/index.d.ts b/types/storybook__react/index.d.ts index 91b686ffcf..92b173d746 100644 --- a/types/storybook__react/index.d.ts +++ b/types/storybook__react/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @storybook/react 3.0 +// Type definitions for @storybook/react 3.4 // Project: https://github.com/storybooks/storybook // Definitions by: Joscha Feth // Anton Izmailov From ff73f631b73e29c66383ca7aeccceb5781aad1b3 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 5 Nov 2018 15:30:05 -0500 Subject: [PATCH 0314/1121] Update styles.d.ts --- types/styled-system/dist/styles.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/dist/styles.d.ts b/types/styled-system/dist/styles.d.ts index 5851c51f79..224b9a9392 100644 --- a/types/styled-system/dist/styles.d.ts +++ b/types/styled-system/dist/styles.d.ts @@ -299,7 +299,7 @@ export interface JustifyContentProps { export function justifyContent(...args: any[]): any; -export type FlexWrapValue = true | "nowrap" | "wrap" | "wrap-reverse"; +export type FlexWrapValue = "nowrap" | "wrap" | "wrap-reverse"; export type ResponsiveFlexWrapValue = ResponsiveValue; export interface FlexWrapProps { From 99cf02c9a4a78f4ae60d00b5898b7c66a02ceef4 Mon Sep 17 00:00:00 2001 From: Konch Roman <300konya@gmail.com> Date: Mon, 5 Nov 2018 19:42:19 +0300 Subject: [PATCH 0315/1121] Add vscode local history plugin to ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ac63b6f6b5..079ad27699 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ npm-debug.log .settings/launch.json .vs .vscode +.history # yarn yarn.lock From eb24763f26b9d20f27b5dedd4455bdc9912a8fe0 Mon Sep 17 00:00:00 2001 From: Konch Roman <300konya@gmail.com> Date: Mon, 5 Nov 2018 22:12:15 +0300 Subject: [PATCH 0316/1121] Add definition for zrender library --- types/zrender/index.d.ts | 57 ++++++++++++++++++++++++++ types/zrender/tsconfig.json | 22 +++++++++++ types/zrender/tslint.json | 79 +++++++++++++++++++++++++++++++++++++ 3 files changed, 158 insertions(+) create mode 100644 types/zrender/index.d.ts create mode 100644 types/zrender/tsconfig.json create mode 100644 types/zrender/tslint.json diff --git a/types/zrender/index.d.ts b/types/zrender/index.d.ts new file mode 100644 index 0000000000..1bf5e5cddf --- /dev/null +++ b/types/zrender/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for zrender 4.0.4 +// Project: https://github.com/ecomfe/zrender +// Definitions by: Roman +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +declare namespace zrender { + type X = number; + type Y = number; + type X2 = number; + type Y2 = number; + type GlobalCoords = boolean; + type ColorStops = { + offset: number; + color: string; + }[]; + + /** + * x, y, x2, y2 are all percent from 0 to 1 + */ + interface LinearGradient { + + new ( + /** @default 0 */ + x?: X, + + /** @default 0 */ + y?: Y, + + /** @default 1 */ + x2?: X2, + + /** @default 0 */ + y2?: Y2, + + /** @default [] */ + colorStops?: ColorStops, + + /** @default false */ + globalCoord?: GlobalCoords, + ): { + type: 'linear'; + x: X; + y: Y; + x2: X2; + y2: Y2; + colorStops: ColorStops; + globalCoord: GlobalCoords; + + addColorStop(offset: number, color: string): void; + }; + } +} + +declare module 'zrender' { + export = zrender; +} diff --git a/types/zrender/tsconfig.json b/types/zrender/tsconfig.json new file mode 100644 index 0000000000..ecc22c8314 --- /dev/null +++ b/types/zrender/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/zrender/tslint.json b/types/zrender/tslint.json new file mode 100644 index 0000000000..a41bf5d19a --- /dev/null +++ b/types/zrender/tslint.json @@ -0,0 +1,79 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "adjacent-overload-signatures": false, + "array-type": false, + "arrow-return-shorthand": false, + "ban-types": false, + "callable-types": false, + "comment-format": false, + "dt-header": false, + "eofline": false, + "export-just-namespace": false, + "import-spacing": false, + "interface-name": false, + "interface-over-type-literal": false, + "jsdoc-format": false, + "max-line-length": false, + "member-access": false, + "new-parens": false, + "no-any-union": false, + "no-boolean-literal-compare": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-construct": false, + "no-declare-current-package": false, + "no-duplicate-imports": false, + "no-duplicate-variable": false, + "no-empty-interface": false, + "no-for-in-array": false, + "no-inferrable-types": false, + "no-internal-module": false, + "no-irregular-whitespace": false, + "no-mergeable-namespace": false, + "no-misused-new": false, + "no-namespace": false, + "no-object-literal-type-assertion": false, + "no-padding": false, + "no-redundant-jsdoc": false, + "no-redundant-jsdoc-2": false, + "no-redundant-undefined": false, + "no-reference-import": false, + "no-relative-import-in-test": false, + "no-self-import": false, + "no-single-declare-module": false, + "no-string-throw": false, + "no-unnecessary-callback-wrapper": false, + "no-unnecessary-class": false, + "no-unnecessary-generics": false, + "no-unnecessary-qualifier": false, + "no-unnecessary-type-assertion": false, + "no-useless-files": false, + "no-var-keyword": false, + "no-var-requires": false, + "no-void-expression": false, + "no-trailing-whitespace": false, + "object-literal-key-quotes": false, + "object-literal-shorthand": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "prefer-conditional-expression": false, + "prefer-const": false, + "prefer-declare-function": false, + "prefer-for-of": false, + "prefer-method-signature": false, + "prefer-template": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "space-within-parens": false, + "strict-export-declare-modifiers": false, + "trim-file": false, + "triple-equals": false, + "typedef-whitespace": false, + "unified-signatures": false, + "void-return": false, + "whitespace": false + } +} From aa2b6a7eb07ef7d6a6e7fc79d84a6e43e0202cd8 Mon Sep 17 00:00:00 2001 From: Konch Roman <300konya@gmail.com> Date: Mon, 5 Nov 2018 14:47:47 +0300 Subject: [PATCH 0317/1121] Enhance definition for echarts options Details: - add definition for tooltip - add definition for x and y axis - add definition for series this commit could lead to braking changes because it was written by official documentation that contains mistakes --- types/echarts/index.d.ts | 1036 +- types/echarts/options/axis-pointer.d.ts | 64 + types/echarts/options/data-zoom.d.ts | 106 + types/echarts/options/series/bar.d.ts | 16597 ++++++++++++ types/echarts/options/series/boxplot.d.ts | 13252 +++++++++ types/echarts/options/series/candlestick.d.ts | 13487 ++++++++++ types/echarts/options/series/custom.d.ts | 7949 ++++++ .../options/series/effect-scatter.d.ts | 16792 ++++++++++++ types/echarts/options/series/funnel.d.ts | 16488 ++++++++++++ types/echarts/options/series/gauge.d.ts | 14272 ++++++++++ types/echarts/options/series/graph.d.ts | 22092 ++++++++++++++++ types/echarts/options/series/heatmap.d.ts | 15348 +++++++++++ types/echarts/options/series/line.d.ts | 17082 ++++++++++++ types/echarts/options/series/lines.d.ts | 14931 +++++++++++ types/echarts/options/series/map.d.ts | 16402 ++++++++++++ types/echarts/options/series/parallel.d.ts | 1329 + .../echarts/options/series/pictorial-bar.d.ts | 17957 +++++++++++++ types/echarts/options/series/pie.d.ts | 16220 ++++++++++++ types/echarts/options/series/radar.d.ts | 5581 ++++ types/echarts/options/series/sankey.d.ts | 5252 ++++ types/echarts/options/series/scatter.d.ts | 16823 ++++++++++++ types/echarts/options/series/sunburst.d.ts | 12292 +++++++++ types/echarts/options/series/theme-river.d.ts | 2484 ++ types/echarts/options/series/tree.d.ts | 6960 +++++ types/echarts/options/series/treemap.d.ts | 14360 ++++++++++ types/echarts/options/text-style.d.ts | 24 + types/echarts/options/tooltip.d.ts | 443 + types/echarts/options/x-axis.d.ts | 39 + types/echarts/options/y-axis.d.ts | 37 + types/echarts/tsconfig.json | 30 +- 30 files changed, 285712 insertions(+), 17 deletions(-) create mode 100644 types/echarts/options/axis-pointer.d.ts create mode 100644 types/echarts/options/data-zoom.d.ts create mode 100644 types/echarts/options/series/bar.d.ts create mode 100644 types/echarts/options/series/boxplot.d.ts create mode 100644 types/echarts/options/series/candlestick.d.ts create mode 100644 types/echarts/options/series/custom.d.ts create mode 100644 types/echarts/options/series/effect-scatter.d.ts create mode 100644 types/echarts/options/series/funnel.d.ts create mode 100644 types/echarts/options/series/gauge.d.ts create mode 100644 types/echarts/options/series/graph.d.ts create mode 100644 types/echarts/options/series/heatmap.d.ts create mode 100644 types/echarts/options/series/line.d.ts create mode 100644 types/echarts/options/series/lines.d.ts create mode 100644 types/echarts/options/series/map.d.ts create mode 100644 types/echarts/options/series/parallel.d.ts create mode 100644 types/echarts/options/series/pictorial-bar.d.ts create mode 100644 types/echarts/options/series/pie.d.ts create mode 100644 types/echarts/options/series/radar.d.ts create mode 100644 types/echarts/options/series/sankey.d.ts create mode 100644 types/echarts/options/series/scatter.d.ts create mode 100644 types/echarts/options/series/sunburst.d.ts create mode 100644 types/echarts/options/series/theme-river.d.ts create mode 100644 types/echarts/options/series/tree.d.ts create mode 100644 types/echarts/options/series/treemap.d.ts create mode 100644 types/echarts/options/text-style.d.ts create mode 100644 types/echarts/options/tooltip.d.ts create mode 100644 types/echarts/options/x-axis.d.ts create mode 100644 types/echarts/options/y-axis.d.ts diff --git a/types/echarts/index.d.ts b/types/echarts/index.d.ts index dc525231e6..804805379d 100644 --- a/types/echarts/index.d.ts +++ b/types/echarts/index.d.ts @@ -4,9 +4,12 @@ // AntiMoron // Liveangela // Ovilia +// Roman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +/// + declare namespace echarts { /** * Creates an ECharts instance, and returns an echartsInstance. You shall @@ -138,6 +141,11 @@ declare namespace echarts { const graphic: Graphic; interface Graphic { + /** + * x, y, x2, y2 are all percent from 0 to 1 + */ + LinearGradient: zrender.LinearGradient; + /** * Clip the given points by the given rectangular. * @@ -433,56 +441,478 @@ declare namespace echarts { height: number } - interface EChartOption { + type EChartsSeriesType = ( + 'line' | 'bar' | 'pie' | 'scatter' | 'effectScatter' | 'radar' + | 'tree' | 'treemap' | 'sunburst' | 'boxplot' | 'candlestick' + | 'heatmap' | 'map' | 'parallel' | 'lines' | 'graph' | 'sankey' + | 'funnel' | 'gauge' | 'pictorialBar' | 'themeRiver' | 'custom' + ); + + interface EChartOption { + /** + * Title component, including main title and subtitle. + * In ECharts 2.x, a single instance of ECharts could contains + * one title component at most. + * However, in ECharts 3, there could be one or more + * than one title components. + * It is more useful when multiple diagrams in one instance all need titles. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#title + */ title?: EChartTitleOption + + /** + * Legend component. + * Legend component shows symbol, color and name of different series. + * You can click legends to toggle displaying series in the chart. + * In ECharts 3, a single echarts instance may contain multiple + * legend components, which makes it easier for the layout of multiple + * legend components. + * If there have to be too many legend items, `vertically scrollable` legend + * or `horizontally scrollable` legend are options to paginate them. + * Check `legend.type` please. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#legend + */ legend?: object, + + /** + * Drawing grid in rectangular coordinate. + * In a single grid, at most two X and Y axes each is allowed. + * `Line chart`, `bar chart`, and `scatter chart (bubble chart)` + * can be drawn in grid. + * In ECharts 2.x, there could only be one single grid component + * at most in a single echarts instance. + * But in ECharts 3, there is no limitation. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#grid + */ grid?: object, - xAxis?: object, - yAxis?: object, + + /** + * The x axis in cartesian(rectangular) coordinate. + * Usually a single grid component can place at most 2 x axis, + * one on the bottom and another on the top. + * offset can be used to avoid overlap when you need to put more + * than two x axis. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis + */ + xAxis?: EChartOption.XAxis | EChartOption.XAxis[], + + /** + * The y axis in cartesian(rectangular) coordinate. + * Usually a single grid component can place at most 2 y axis, + * one on the left and another on the right. offset can be used + * to avoid overlap when you need to put more than two y axis. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis + */ + yAxis?: EChartOption.YAxis | EChartOption.YAxis[], + + /** + * Polar coordinate can be used in scatter and line chart. + * Every polar coordinate has an `angleAxis` and a `radiusAxis`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#polar + */ polar?: object, + + /** + * Radial axis of polar coordinate. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#radiusAxis + */ radiusAxis?: object, + + /** + * The angle axis in Polar Coordinate. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#angleAxis + */ angleAxis?: object, + + /** + * Coordinate for `radar charts`. + * This component is equal to the polar component in ECharts 2. + * Because the polar component in the echarts 3 is reconstructed + * to be the standard polar coordinate component, + * this component is renamed to be radar to avoid confusion. + * Radar chart coordinate is different from polar coordinate, + * in that every axis indicator of the radar chart coordinate + * is an individual dimension. + * The style of indicator coordinate axis could be configured + * through the following configuration items, + * including `name`, `axisLine`, `axisTick`, `axisLabel`, + * `splitLine`, `splitArea`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#radar + */ radar?: object, - dataZoom?: object[], + + /** + * `dataZoom` component is used for zooming a specific area, + * which enables user to investigate data in detail, + * or get an overview of the data, + * or get rid of outlier points. + * These types of `dataZoom` component are supported: + * + `dataZoomInside`: Data zoom functionalities is embeded + * inside coordinate systems, enable user to zoom + * or roam coordinate system by mouse dragging, + * mouse move or finger touch (in touch screen). + * + `dataZoomSlider`: A special slider bar is provided, + * on which coordinate systems can be zoomed or roamed + * by mouse dragging or finger touch (in touch screen). + * + `dataZoomSelect`: A marquee tool is provided for zooming + * or roaming coordinate system. + * That is `toolbox.feature.dataZoom`, which can only be configured + * in toolbox. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom + */ + dataZoom?: EChartOption.DataZoom[], + + /** + * `visualMap` is a type of component for visual encoding, + * which maps the data to visual channels, including: + * + symbol: Type of symbol. + * + symbolSize: Symbol size. + * + color: Symbol color. + * + colorAlpha: Symbol alpha channel. + * + opacity: Opacity of symbol and others (like labels). + * + colorLightness: Lightness in HSL. + * + colorSaturation: Saturation in HSL. + * + colorHue: Hue in HSL. + * Myltiple `visualMap` component could be defined in a chart instance, + * which enable that different dimensions + * of a series data are mapped to different visual channels. + * `visualMap` could be defined as `Piecewise (visualMapPiecewise)` + * or `Continuous (visualMapContinuous)`, + * which is distinguished by the property type. + * + * @example + * option = { + * visualMap: [ + * { // the first visualMap component + * type: 'continuous', // defined to be continuous viusalMap + * ... + * }, + * { // the sencond visualMap component + * type: 'piecewise', // defined to be piecewise visualMap + * ... + * } + * ], + * ... + * }; + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap + */ visualMap?: object[], - tooltip?: object, - axisPointer?: object, + + /** + * Tooltip component. + * It can be configured on different places: + * + Configured on global: `tooltip` + * + Configured in a coordinate system: `grid.tooltip`, + * `polar.tooltip`, `single.tooltip` + * + Configured in a series: `series.tooltip` + * + Configured in each item of `series.data`: `series.data.tooltip` + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip + */ + tooltip?: EChartOption.Tooltip, + + /** + * `axisPointer` is a tool for displaying reference line and axis value + * under mouse pointer. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#axisPointer + */ + axisPointer?: EChartOption.AxisPointer, + + /** + * A group of utility tools, which includes `export`, `data view`, + * `dynamic type switching`, `data area zooming`, and `reset`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#toolbox + */ toolbox?: object, + + /** + * `brush` is an area-selecting component, with which user can select + * part of data from a chart to display in detail, or doing calculations + * with them. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#brush + */ brush?: object, + + /** + * Geographic coorinate system component. + * Geographic coorinate system component is used to draw maps, + * which also supports `scatter series`, and `line series`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#geo + */ geo?: object, + + /** + * `Parallel Coordinates` is a common way of visualizing high-dimensional + * geometry and analyzing multivariate data. + * For example, `series-parallel.data` is the following data: + * + * @example + * [ + * [1, 55, 9, 56, 0.46, 18, 6, 'good'], + * [2, 25, 11, 21, 0.65, 34, 9, 'excellent'], + * [3, 56, 7, 63, 0.3, 14, 5, 'good'], + * [4, 33, 7, 29, 0.33, 16, 6, 'excellent'], + * { // Data item can also be an Object, + * // so that perticular settings of its line can be set here. + * value: [5, 42, 24, 44, 0.76, 40, 16, 'excellent'] + * lineStyle: {...}, + * } + * ... + * ] + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#parallel + */ parallel?: object, + + /** + * This component is the coordinate axis for parallel coordinate. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#parallelAxis + */ parallelAxis?: object, + + /** + * An axis with a single dimension. It can be used to display data + * in one dimension. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#singleAxis + */ singleAxis?: object, + + /** + * `timeline` component, which provides functions like switching and playing + * between multiple ECharts `options`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#timeline + */ timeline?: object, + + /** + * `graphic` component enable creating graphic elements in echarts. + * Those graphic type are supported. + * `image`, `text`, `circle`, `sector`, `ring`, `polygon`, + * `polyline`, `rect`, `line`, `bezierCurve`, `arc`, `group`, + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#graphic + */ graphic?: object | object[], + + /** + * Calendar coordinates. + * In ECharts, we are very creative to achieve the calendar chart, + * by using the calendar coordinates + * to achieve the calendar chart, as shown in the following example, + * we can use calendar coordinates + * in `heatmap`, `scatter`, `effectScatter`, and `graph`. + + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#calendar + */ calendar?: object, + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset + */ dataset?: object, + + /** + * `dataset` component is published since ECharts 4. + * `dataset` brings convenience in data management separated with styles + * and enables data reuse by different series. + * More importantly, is enables data encoding from data to visual, + * which brings convenience in some scenarios. + * More details about `dataset` can be checked in the tutorial. + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#aria + */ aria?: object, - series?: object[], + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series + */ + series?: TSeries[], + + /** + * The color list of palette. + * If no color is set in series, the colors would be adopted sequentially + * and circularly from this list + * as the colors of series. + * @default + * [ + * '#c23531','#2f4554','#61a0a8','#d48265','#91c7ae', + * '#749f83', '#ca8622','#bda29a','#6e7074','#546570', + * '#c4ccd3' + * ] + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#color + */ color?: string[], + + /** + * Background color. Defaults to have no background. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#backgroundColor + */ backgroundColor?: string, - textStyle?: object, + + /** + * Global font style. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#textStyle + */ + textStyle?: EChartOption.TextStyle, + + /** + * Whether to enable animation. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animation + */ animation?: boolean, + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than threshold. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationThreshold + */ animationThreshold?: number, + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect + * + * @example + * animationDuration: function (idx) { + * // delay for later data is larger + * return idx * 100; + * } + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationDuration + */ animationDuration?: number, + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at `easing effect example`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationEasing + */ animationEasing?: string, + + /** + * Delay before updating the first animation, which supports + * callback function for different data + * to have different animation effect. + * + * @example + * animationDelay: function (idx) { + * // delay for later data is larger + * return idx * 100; + * } + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationDelay + */ animationDelay?: number | Function, + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect + * + * @example + * animationDurationUpdate: function (idx) { + * // delay for later data is larger + * return idx * 100; + * } + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationDurationUpdate + */ animationDurationUpdate?: number | Function, + + /** + * Easing method used for animation. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationEasingUpdate + */ animationEasingUpdate?: string, + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * @example + * animationDelayUpdate: function (idx) { + * // delay for later data is larger + * return idx * 100; + * } + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#animationDelayUpdate + */ animationDelayUpdate?: number | Function, + + /** + * Configuration for progressive/incremental rendering + * + * @default 400 + */ progressive?: number, + + /** + * Configuration for progressive/incremental rendering + * + * @default 3000 + */ progressiveThreshold?: number, + + /** + * Equal to CanvasRenderingContext2D.globalCompositeOperation + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * + */ blendMode?: string, + + /** + * Threshold of if use single hover layer to optimize. + * It is recommended that `hoverLayerThreshold` is equivalent to or less than + * `progressiveThreshold`, otherwise hover will cause restart of progressive, + * which is unexpected. + * see example . + * + * @default 3000 + */ hoverLayerThreshold?: number, + + /** + * Whether to use UTC in display. + * - `true`: When `axis.type` is `'time'`, ticks is determined + * according to UTC, and `axisLabel` and `tooltip` use UTC by default. + * - `false`: When `axis.type` is `'time'`, ticks is determined + * according to local time, and `axisLabel` and `tooltip` use local time + * by default. + * + * The default value of useUTC is false, for sake of considering: + * - In many cases, labels should be displayed in local time + * (whether the time is stored in server in local time or UTC). + * - If user uses time string (like '2012-01-02') in data, + * it usually means local time if time zone is not specified. + * Time should be displayed in its original time zone by default. + * + * Notice: the setting only effects 'display time', but not 'parse time'. + * About how time value (like `1491339540396`, `'2013-01-04'`, ...) + * is parsed in echarts, see `the time part in date`. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#useUTC + */ useUTC?: boolean, - /** echarts-gl options */ - globe?: object, - geo3D?: object, - mapbox3D?: object, - grid3D?: object, - xAxis3D?: object, - yAxis3D?: object, - zAxis3D?: object } interface EChartsOptionConfig { @@ -566,6 +996,580 @@ declare namespace echarts { */ zlevel?: 0 } + + namespace EChartOption { + type Series = ( + SeriesLine + | SeriesBar + | SeriesPie + | SeriesScatter + | SeriesEffectScatter + | SeriesRadar + | SeriesTree + | SeriesTreemap + | SeriesSunburst + | SeriesBoxplot + | SeriesCandlestick + | SeriesHeatmap + | SeriesMap + | SeriesParallel + | SeriesLines + | SeriesGraph + | SeriesSankey + | SeriesFunnel + | SeriesGauge + | SeriesPictorialBar + | SeriesThemeRiver + | SeriesCustom + ) + + namespace CommonProps { + interface Axis { + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option or API. + */ + id?: string; + + /** + * If show this axis. + * + * @default 'true' + */ + show?: boolean; + + /** + * The index of grid which this axis belongs to. + * Defaults to be in the first grid. + * + * @default 0 + */ + gridIndex?: number; + + /** + * Offset of this axis relative to default position. + * Useful when multiple axis of this type has same position value. + * + * @default 0 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.offset + */ + offset?: number; + + /** + * Name of axis. + */ + name?: string; + + /** + * Location of axis name. + * + * @default 'start' + */ + nameLocation?: 'start' | 'middle' | 'center' | 'end'; + + /** + * Text style of axis name. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.nameTextStyle + */ + nameTextStyle?: Axis.TextStyle; + + /** + * Gap between axis name and axis line. + * + * @default 15 + */ + nameGap?: number; + + /** + * Rotation of axis name. + * + * @default null + */ + nameRotate?: number; + + /** + * Whether axis is inversed. New option from ECharts 3. + * + * @default false + */ + inverse?: boolean; + + /** + * The boundary gap on both sides of a coordinate axis. + * The setting and behavior of category axes and non-category axes are + * different. The `boundaryGap` of category axis can be set to either + * `true` or `false`. Default value is set to be `true`, in which case + * `axisTick` is served only as a separation line, and labels and data + * appear only in the center part of two axis ticks, which is called + * band. For non-category axis, including time, numerical value, and + * log axes, `boundaryGap` is an array of two values, representing the + * spanning range between minimum and maximum value. + * The value can be set in numeric value or relative percentage, + * which becomes invalid after setting `min` and `max`. + * + * @example + * boundaryGap: ['20%', '20%'] + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.boundaryGap + */ + boundaryGap?: boolean | (string | number)[]; + + /** + * The minimun value of axis. + * It can be set to a special value `'dataMin'` so that + * the minimum value on this axis is set to be the minimum label. + * It will be automatically computed to make sure axis tick is equally + * distributed when not set. In category axis, it can also be set + * as the ordinal number. + * For example, if a catergory axis has + * `data: ['categoryA', 'categoryB', 'categoryC']` + * , and the ordinal `2` represents `'categoryC'`. + * Moreover, it can be set as negative number, like `-3`. + * + * @default null + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.min + */ + min?: number | string; + + /** + * The maximum value of axis. + * It can be set to a special value `'dataMax'` so that + * the minimum value on this axis is set to be the maximum label. + * It will be automatically computed to make sure axis tick is equally + * distributed when not set. + * In category axis, it can also be set as the ordinal number. + * For example, if a catergory axis has + * `data: ['categoryA', 'categoryB', 'categoryC']` + * , and the ordinal `2` represents `'categoryC'`. + * Moreover, it can be set as negative number, like `-3`. + * + * @default null + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.max + */ + max?: number | string; + + /** + * It is available only in numerical axis, i.e., type: `'value'`. + * It specifies whether not to contain zero position + * of axis compulsively. + * When it is set to be `true`, the axis may not contain zero position, + * which is useful in the scatter chart for both value axes. + * This configuration item is unavailable when the `min` and `max` + * are set. + * + * @default false + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.scale + */ + scale?: boolean; + + /** + * Number of segments that the axis is split into. + * Note that this number serves only as a recommendation, + * and the true segments may be adjusted based on readability. + * This is unavailable for category axis. + * + * @default 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.splitNumber + */ + splitNumber?: number; + + /** + * Maximum gap between split lines. + * For example, in time axis (type is `'time'`), + * it can be set to be `3600 * 24 * 1000` to make sure + * that the gap between axis labels is less than or equal to one day. + * @example + * { + * maxInterval: 3600 * 1000 * 24 + * } + * It is available only for axis of type `'value'` or `'time'`. + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.minInterval + */ + minInterval?: any; + + /** + * Compulsively set segmentation interval for axis. + * As splitNumber is a recommendation value, + * the calculated tick may not be the same as expected. + * In this case, interval should be used along with min and max + * to compulsively set tickings. + * But in most cases, we do not suggest using this, + * out automatic calculation is enough for most situations. + * This is unavailable for category axis. + * Timestamp should be passed for type: `'time'` axis. + * Logged value should be passed for type: `'log'` axis. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.interval + */ + interval?: number; + + /** + * Base of logarithm, which is valid only for numeric axes with type: + * `'log'`. + * + * @default 10 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.logBase + */ + logBase?: number; + + /** + * True for axis that cannot be interacted with. + * + * @default false + */ + silent?: boolean; + + /** + * Whether the labels of axis triggers and reacts to mouse events. + * Parameters of event includes: + * + * @example + * { + * // Component type: xAxis, yAxis, radiusAxis, angleAxis + * // Each of which has an attribute for index, e.g., xAxisIndex for xAxis + * componentType: string, + * // Value on axis before being formatted. + * // Click on value label to trigger event. + * value: '', + * // Name of axis. + * // Click on laben name to trigger event. + * name: '' + * } + * + * @default false + */ + triggerEvent?: boolean; + + /** + * Settings related to axis line. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.axisLine + */ + axisLine?: Axis.Line; + + /** + * Settings related to axis tick. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.axisTick + */ + axisTick?: Axis.Tick; + + /** + * Settings related to axis label. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.axisLabel + */ + + axisLabel?: Axis.Label; + + /** + * SplitLine of axis in grid area. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.splitLine + */ + + splitLine?: Axis.SplitLine; + + /** + * Split area of axis in grid area, not shown by default. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.splitArea + */ + splitArea?: Axis.SplitArea; + + /** + * Category data, available in type: `'category'` axis. + * If `type` is not specified, but `axis.data` is specified, + * the `type` is auto set as `'category'`. + * If type is specified as `'category'`, + * but axis.data is not specified, `axis.data` will be + * auto collected from `series.data`. + * It brings convenience, but we should notice that + * `axis.data` provides then value range of the `'category'` axis. + * If it is auto collected from `series.data`, + * Only the values appearing in series.data can be collected. + * For example, if series.data is empty, nothing will be collected. + * + * @example + * // Name list of all categories + * data: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] + * // Each item could also be a specific configuration item. + * // In this case, `value` is used as the category name. + * data: [{ + * value: 'Monday', + * // Highlight Monday + * textStyle: { + * fontSize: 20, + * color: 'red' + * } + * }, 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.data + */ + data?: Axis.Data[]; + + /** + * axisPointer settings on the axis. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.axisPointer + */ + axisPointer?: Axis.Pointer; + + /** + * `zlevel` value of all graghical elements in this axis. + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements + * (like those with animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, + * and should be used carefully on mobile phones to avoid crash. + * Canvases with bigger `zlevel` will be placed on Canvases + * with smaller `zlevel`. + * + * @default 0 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.zlevel + */ + zlevel?: number; + + /** + * z value of all graghical elements in this axis, + * which controls order of drawing graphical components. + * Components with smaller z values may be overwritten by those + * with larger z values. + * z has a lower priority to zlevel, and will not create new Canvas. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.z + */ + z?: number; + } + + namespace Axis { + type Type = 'value' | 'category' | 'time' | 'log'; + + /** + * @todo describe + */ + interface Style { + color?: string; + fontStyle?: 'normal' | 'italic' | 'oblique'; + fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' + | '100' | '200' | '300' | '400'; + fontFamily?: string; + fontSize?: number; + align?: string; + verticalAlign?: string; + lineHeight?: number; + backgroundColor?: string | object; + borderColor?: string; + borderWidth?: number; + borderRadius?: number; + padding?: number | number[]; + shadowColor?: string; + shadowBlur?: number; + shadowOffsetX?: number; + shadowOffsetY?: number; + width?: number | string; + height?: number | string; + textBorderColor?: string; + textBorderWidth?: number; + textShadowColor?: string; + textShadowBlur?: number; + textShadowOffsetX?: number; + textShadowOffsetY?: number; + } + + /** + * @todo describe + */ + interface RichStyle { + [userStyleName: string]: Style; + } + + interface TextStyle extends Style { + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis.data.textStyle.rich + */ + rich?: RichStyle; + } + + /** + * @todo describe + */ + interface Line { + show?: boolean; + onZero?: boolean; + onZeroAxisIndex?: number; + symbol?: string | string[]; + symbolSize?: number[]; + symbolOffset?: number[]; + lineStyle?: { + color?: string; + width?: number; + type?: 'solid' | 'dashed' | 'dotted'; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + opacity?: number; + }; + } + + /** + * @todo describe + */ + interface Tick { + show?: boolean; + alignWithLabel?: boolean; + interval?: number | Function; + inside?: boolean; + length?: number; + lineStyle?: { + color?: string; + width?: number; + type?: 'solid' | 'dashed' | 'dotted'; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + opacity?: number; + }; + } + + /** + * @todo describe + */ + interface Label extends TextStyle { + show?: boolean; + interval?: number | Function; + inside?: boolean; + rotate?: number; + margin?: number; + formatter?: string | Function; + showMinLabel?: boolean; + showMaxLabel?: boolean; + } + + /** + * @todo describe + */ + interface SplitLine { + show?: boolean; + interval?: number | Function; + lineStyle?: { + color?: string | string[]; + width?: number; + type?: 'solid' | 'dashed' | 'dotted'; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + opacity?: number; + }; + } + + /** + * @todo describe + */ + interface SplitArea { + interval?: number | Function; + show?: boolean; + areaStyle?: { + color?: string[]; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + opacity?: number; + }; + } + + /** + * @todo describe + */ + interface Data { + value?: string; + textStyle?: TextStyle; + } + + /** + * @todo describe + */ + interface Pointer { + show?: boolean; + type?: 'line' | 'shadow' | 'none'; + snap?: boolean; + z?: number; + label?: PointerLabel; + lineStyle?: { + color?: string; + width?: number; + type?: string; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + opacity?: number; + }; + shadowStyle?: { + color?: string; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + opacity?: number; + }; + triggerTooltip?: boolean; + value?: number; + status?: boolean; + handle?: { + show?: boolean; + icon?: any; + size?: number | number[]; + margin?: number; + color?: string; + throttle?: number; + shadowBlur?: number; + shadowColor?: string; + shadowOffsetX?: number; + shadowOffsetY?: number; + }; + } + + interface PointerLabel { + show?: boolean; + precision?: number | string; + formatter?: string | Function; + margin?: boolean; + color?: string; + fontStyle?: 'normal' | 'italic' | 'oblique'; + fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' + | '100' | '200' | '300' | '400'; + fontFamily?: string; + fontSize?: number; + lineHeight?: number; + backgroundColor?: string | object; + borderColor?: string; + borderWidth?: number; + borderRadius?: number; + padding?: number | number[]; + shadowColor?: string; + shadowBlur?: number; + shadowOffsetX?: number; + shadowOffsetY?: number; + width?: number | string; + height?: number | string; + textBorderColor?: string; + textBorderWidth?: number; + textShadowColor?: string; + textShadowBlur?: number; + textShadowOffsetX?: number; + textShadowOffsetY?: number; + } + } + } + } } declare module 'echarts' { diff --git a/types/echarts/options/axis-pointer.d.ts b/types/echarts/options/axis-pointer.d.ts new file mode 100644 index 0000000000..603e2cdefc --- /dev/null +++ b/types/echarts/options/axis-pointer.d.ts @@ -0,0 +1,64 @@ +declare namespace echarts { + namespace EChartOption { + /** + * @todo describe + */ + interface AxisPointer extends CommonProps.Axis.Pointer { + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component + * in option or API. + */ + id?: string; + + /** + * axisPointers can be linked to each other. + * The term 'link' represents that axes are synchronized + * and move together. + * Axes are linked according to the value of axisPointer. + * See + * [sampleA](https://ecomfe.github.io/echarts-examples/public/view.html?c=candlestick-brush&edit=1&reset=1) + * and + * [sampleB](https://ecomfe.github.io/echarts-examples/public/view.html?c=scatter-nutrients-matrix&edit=1&reset=1). + * link is an array, where each item represents a 'link group'. + * Axes will be linked when they are refered + * in the same link group. + * + * @example: + * link: [ + * { + * // All axes with xAxisIndex 0, 3, 4 and yAxisName 'sameName' will be linked. + * xAxisIndex: [0, 3, 4], + * yAxisName: 'someName' + * }, + * { + * // All axes with xAxisId 'aa', 'cc' and all angleAxis will be linked. + * xAxisId: ['aa', 'cc'], + * angleAxis: 'all' + * }, + * ... + * ] + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#axisPointer.link + */ + link?: object[]; + + /** + * Conditions to trigger tooltip. + * Options: + * + `'mousemove'` - Trigger when mouse moves. + * + `'click'` - Trigger when mouse clicks. + * + `'mousemove|click'` - Trigger when mouse clicks and moves. + * `'none'` - Do not triggered by `'mousemove'` and `'click'`. + * Tooltip can be triggered and hidden manually by calling + * `action.tooltip.showTip` and `action.tooltip.hideTip`. + * It can also be triggered by `axisPointer.handle` in this case. + * + * This attribute is new to ECharts 3.0. + * + * @default 'mousemove|click' + */ + triggerOn?: 'mousemove' | 'click' | 'mousemove|click' | 'none'; + } + } +} diff --git a/types/echarts/options/data-zoom.d.ts b/types/echarts/options/data-zoom.d.ts new file mode 100644 index 0000000000..2ed18582ef --- /dev/null +++ b/types/echarts/options/data-zoom.d.ts @@ -0,0 +1,106 @@ +declare namespace echarts { + namespace EChartOption { + /** + * Data zoom component of inside type. + * Refer to dataZoom for more information. + * The inside means it's inside the coordinates. + * Translation: data area can be translated when moving in coordinates. + * Scaling: + * PC: when mouse rolls (similar with touch pad) in coordinates. + * Mobile: when touches and moved with two fingers in coordinates + * on touch screens. + * + * @todo describe + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom-inside + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom-slider + */ + type DataZoom = DataZoom.Inside + | DataZoom.Slider; + + namespace DataZoom { + /** + * Data zoom component of inside type. + * Refer to dataZoom for more information. + * The inside means it's inside the coordinates. + * Translation: data area can be translated when moving in coordinates. + * Scaling: + * PC: when mouse rolls (similar with touch pad) in coordinates. + * Mobile: when touches and moved with two fingers in coordinates + * on touch screens. + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom-inside + */ + interface Inside { + type?: string; + id?: string; + disable?: boolean; + xAxisIndex?: number | number[]; + yAxisIndex?: number | number[]; + radiusAxisIndex?: number | number[]; + angleAxisIndex?: number | number[]; + filterMode?: 'filter' | 'weakFilter' | 'empty' | 'none'; + start?: number; + end?: number; + startValue?: number | string | Date; + endValue?: number | string | Date; + minSpan?: number; + maxSpan?: number; + minValueSpan?: number | string | Date; + maxValueSpan?: number | string | Date; + orient?: string; + zoomLock?: boolean; + throttle?: number; + rangeMode?: string[]; + zoomOnMouseWheel?: boolean; + moveOnMouseMove?: boolean; + moveOnMouseWheel?: boolean; + preventDefaultMouseMove?: boolean; + } + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom-slider + */ + interface Slider { + type?: string; + id?: string; + show?: boolean; + backgroundColor?: string; + dataBackground?: object; + fillColor?: string; + borderColor?: string; + handleIcon?: string; + handleSize?: number; + handleStyle?: object; + labelPrecision?: number; + labelFormatter?: string | Function; + showDetail?: boolean; + showDataShadow?: string; + realtime?: boolean; + textStyle?: object; + xAxisIndex?: number | number[]; + yAxisIndex?: number | number[]; + radiusAxisIndex?: number | number[]; + angleAxisIndex?: number | number[]; + filterMode?: 'filter' | 'weakFilter' | 'empty' | 'none'; + start?: number; + end?: number; + startValue?: number | string | Date; + endValue?: number | string | Date; + minSpan?: number; + maxSpan?: number; + minValueSpan?: number | string | Date; + maxValueSpan?: number | string | Date; + orient?: 'vertical' | 'horizontal'; + zoomLock?: boolean; + throttle?: number; + rangeMode?: string[]; + zlevel?: number; + z?: number; + left?: string | number; + top?: string | number; + right?: string | number; + bottom?: string | number; + } + } + } +} diff --git a/types/echarts/options/series/bar.d.ts b/types/echarts/options/series/bar.d.ts new file mode 100644 index 0000000000..07b47cac2d --- /dev/null +++ b/types/echarts/options/series/bar.d.ts @@ -0,0 +1,16597 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **bar chart** + * + * Bar chart shows different data through the height of a bar, which + * is used in + * [rectangular coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * with at least 1 category axis. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar + */ + interface SeriesBar { + [k: string]: any; + + /** + * @default + * "bar" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.type + */ + type?: 'bar'; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.name + */ + name?: string; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.yAxisIndex) + * to assign the corresponding axis component. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Text label of , to explain some data information about graphic + * item like value, name and so on. + * `label` is placed under `itemStyle` in ECharts 2.x. + * In ECharts 3, to make the configuration structure flatter, `label`is + * taken to be at the same level with `itemStyle`, and has `emphasis` + * as `itemStyle` does. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label + */ + label?: { + /** + * Some properties like "normal" or "emphasis" are not documented. + * Please, write description for them + */ + [unknownProperty: string]: any; + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to represent + * position of label relative to top-left corner of bounding + * box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally and + * move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Graphic style of , `emphasis` is the style when it is highlighted, + * like being hovered by mouse, or highlighted via legend connect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle + */ + itemStyle?: { + /** + * Some properties like "normal" or "emphasis" are not documented. + * Please, write description for them + */ + [unknownProperty: string]: any; + + /** + * Bar color. defaults to acquire colors from global palette + * [option.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * . + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.color + */ + color?: string; + + /** + * The bodrder color of bar. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.barBorderColor + */ + barBorderColor?: string; + + /** + * The bodrder width of bar. defaults to have no border. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.barBorderWidth + */ + barBorderWidth?: number; + + /** + * The radius of rounded corner. + * Its unit is px. + * And it supports use array to respectively specify the 4 corner + * radiuses. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.barBorderRadius + */ + barBorderRadius?: any[] | number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle + */ + itemStyle?: { + + /** + * Bar color.. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.color + */ + color?: string; + + /** + * The bodrder color of bar. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.barBorderColor + */ + barBorderColor?: string; + + /** + * The bodrder width of bar. defaults to have no border. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.barBorderWidth + */ + barBorderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * Name of stack. + * On the same category axis, the series with the same `stack` name + * would be put on top of each other. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.stack + */ + stack?: string; + + /** + * The mouse style when mouse hovers on an element, the same as + * `cursor` property in `CSS`. + * + * + * @default + * "pointer" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.cursor + */ + cursor?: string; + + /** + * The width of the bar. Adaptive when not specified. + * + * In a single coodinate system, this attribute is shared by multiple + * `'bar'` series. + * This attribute should be set on the last `'bar'` series in the + * coodinate system, then it will be adopted by all `'bar'` series + * in the coordinate system. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.barWidth + */ + barWidth?: number; + + /** + * The maximum width of the bar. Adaptive when not specified. + * + * In a single coodinate system, this attribute is shared by multiple + * `'bar'` series. + * This attribute should be set on the last `'bar'` series in the + * coodinate system, then it will be adopted by all `'bar'` series + * in the coordinate system. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.barMaxWidth + */ + barMaxWidth?: number; + + /** + * The minimum width of bar. + * It could be used to avoid the following situation: the interaction + * would be affected when the value of some data item is too small. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.barMinHeight + */ + barMinHeight?: number; + + /** + * The gap between bars between different series, is a percent value + * like `'30%'`, which means `30%` of the bar width. + * + * Set barGap as `'-100%'` can overlap bars that belong to different + * series, which is useful when making a series of bar be background. + * + * In a single coodinate system, this attribute is shared by multiple + * `'bar'` series. + * This attribute should be set on the last `'bar'` series in the + * coodinate system, then it will be adopted by all `'bar'` series + * in the coordinate system. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * + * @default + * 30% + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.barGap + */ + barGap?: string; + + /** + * The bar gap of a single series, defaults to be `20%` of the category + * gap, can be set as a fixed value. + * + * In a single coodinate system, this attribute is shared by multiple + * `'bar'` series. + * This attribute should be set on the last `'bar'` series in the + * coodinate system, then it will be adopted by all `'bar'` series + * in the coordinate system. + * + * + * @default + * '20%' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.barCategoryGap + */ + barCategoryGap?: string; + + /** + * Whether to enable the optimization of large-scale data. + * It could be set when large data causes performance problem. + * + * After being enabled, `largeThreshold` can be used to indicate + * the minimum number for turning on the optimization. + * + * But when the optimization enabled, the style of single data item + * can't be customized any more. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.large + */ + large?: boolean; + + /** + * The threshold enabling the drawing optimization. + * + * + * @default + * 400 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.largeThreshold + */ + largeThreshold?: number; + + /** + * `progressive` specifies the amount of graphic elements that can + * be rendered within a frame (about 16ms) if "progressive rendering" + * enabled. + * + * When data amount is from thousand to more than 10 million, it + * will take too long time to render all of the graphic elements. + * Since ECharts 4, "progressive rendering" is supported in its + * workflow, which processes and renders data chunk by chunk alone + * with each frame, avoiding to block the UI thread of the browser. + * + * + * @default + * 5000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.progressive + */ + progressive?: number; + + /** + * If current data amount is over the threshold, "progressive rendering" + * is enabled. + * + * + * @default + * 3000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.progressiveThreshold + */ + progressiveThreshold?: number; + + /** + * Chunk approach, optional values: + * + * + `'sequential'`: slice data by data index. + * + `'mod'`: slice data by mod, which make the data items of each + * chunk coming from all over the data, bringing better visual effect + * while progressive rendering. + * + * + * @default + * "mod" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.progressiveChunkMode + */ + progressiveChunkMode?: string; + + /** + * `dimensions` can be used to define dimension info for `series.data` + * or `dataset.source`. + * + * Notice: if + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, we can provide dimension names in the first column/row + * of + * [dataset.source](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset.source) + * , and not need to specify `dimensions` here. + * But if `dimensions` is specified here, echarts will not retrieve + * dimension names from the first row/column of `dataset.source` + * any more. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * Each data item of `dimensions` can be: + * + * + `string`, for example, `'someName'`, which equals to `{name: + * 'someName'}`. + * + `Object`, where the attributes can be: + * + name: `string`. + * + type: `string`, supports: + * + `number` + * + `float`, that is, + * [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) + * + * + `int`, that is, + * [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) + * + * + `ordinal`, discrete value, which represents string generally. + * + `time`, time value, see + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * to check the format of time value. + * + displayName: `string`, generally used in tooltip for dimension + * display. If not specified, use `name` by default. + * + * When `dimensions` is specified, the default `tooltip` will be + * displayed vertically, which is better to show diemsion names. + * Otherwise, `tooltip` will displayed only value horizontally. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.dimensions + */ + dimensions?: any[]; + + /** + * Define what is encoded to for each dimension of `data`. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * Attributes of encode are different according to the type of coordinate + * systtems. For + * [cartesian2d](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , `x` and `y` can be defined. For + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * , `radius` and `angle` can be defined. For + * [geo](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * , `lng` and `lat` can be defined. + * Attribute `tooltip` and `itemName` (data item name in tooltip) + * are always able to be defined. + * + * When + * [dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.dimensions) + * is used to defined name for a certain dimension, `encode` can + * refer the name directly. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * Specially, in \[custom series(~series-custom), some property + * in `encode`, corresponding to axis, can be set as null to make + * the series not controlled by the axis, that is, the series data + * will not be count in the extent of the axis, and the + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * on the axis will not filter the series. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.encode + */ + encode?: object; + + /** + * When + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, `seriesLayoutBy` specifies whether the column or the + * row of `dataset` is mapped to the series, namely, the series + * is "layout" on columns or rows. Optional values: + * + * + 'column': by default, the columns of `dataset` are mapped the + * series. In this case, each column represents a dimension. + * + 'row':the rows of `dataset` are mapped to the series. + * In this case, each row represents a dimension. + * + * Check this + * [example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=dataset-series-layout-by) + * . + * + * + * @default + * "column" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.seriesLayoutBy + */ + seriesLayoutBy?: string; + + /** + * If + * [series.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * is not specified, and + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * exists, the series will use `dataset`. + * `datasetIndex` specifies which dataset will be used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.datasetIndex + */ + datasetIndex?: number; + + /** + * Data array of series, which can be in the following forms: + * + * Notice, if no `data` specified in series, and there is + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * in option, series will use the first + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * as its datasource. If `data` has been specified, + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * will not used. + * + * `series.datasetIndex` can be used to specify other + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * . + * + * Basically, data is represented by a two-dimension array, like + * the example below, where each colum is named as a "dimension". + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * + In + * [cartesian (grid)](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , "dimX" and "dimY" correspond to + * [xAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * and + * [yAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * repectively. + * + In + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * "dimX" and "dimY" correspond to + * [radiusAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#radiusAxis) + * 和 + * [angleAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#anbleAxis) + * repectively. + * + Other dimensions are optional, which can be used in other place. + * For example: + * + [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * can map one or more dimensions to viusal (color, symbol size + * ...). + * + [series.symbolSize](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.symbolSize) + * can be set as a callback function, where symbol size can be calculated + * by values of a certain dimension. + * + Values in other dimensions can be shown by + * [tooltip.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.formatter) + * or + * [series.label.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.label.formatter) + * . + * + * Especially, when there is one and only one category axis (axis.type + * is `'category'`), data can be simply be represented by a one-dimension + * array, like: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * **Relationship between "value" and + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.type) + * ** + * + * + When a dimension corresponds to a value axis (axis.type + * is `'value'` or `'log'`): + * + * The value can be a `number` (like `12`) (can also be a number + * in a `string` format, like `'12'`). + * + * + When a dimension corresponds to a category axis (axis.type + * is `'category'`): + * + * The value should be the ordinal of the axis.data + * (based on `0`), the string value of the axis.data. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * There is an example of double category axes: + * [Github Punchcard](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-punchCard) + * . + * + * + When a dimension corresponds to a time axis (type is `'time'`), + * the value can be: + * + * + a timestamp, like `1484141700832`, which represents a UTC time. + * + a date string, in one of the formats below: + * + a subset of + * [ISO 8601](http://www.ecma-international.org/ecma-262/5.1/#se + * c-15.9.1.15) + * , only including (all of these are treated as local time unless + * timezone is specified, which is consistent with + * [moment](https://momentjs.com/) + * ): + * + only part of year/month/date/time are specified: `'2012-03'`, + * `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + * + separated by `"T"` or a space: `'2012-03-01T12:22:33.123'`, + * `'2012-03-01 12:22:33.123'`. + * + timezone specified: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, + * `'2012-03-01T12:22:33-05:00'`. + * + other date string format (all of these are treated as local + * time): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, + * `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`. + * + a JavaScript Date instance created by user: + * + Caution, when using a data string to create a Date instance, + * [browser differences and inconsistencies](http://dygraphs.com/date-formats.html) + * should be considered. + * + For example: In chrome, `new Date('2012-01-01')` is treated + * as a Jan 1st 2012 in UTC, while `new Date('2012-1-1')` and `new + * Date('2012/01/01')` are treated as Jan 1st 2012 in local timezone. + * In safari `new Date('2012-1-1')` is not supported. + * + So if you intent to perform `new Date(dateString)`, it is strongly + * recommended to use a time parse library (e.g., + * [moment](https://momentjs.com/) + * ), or use `echarts.number.parseDate`, or check + * [this](http://dygraphs.com/date-formats.html) + * . + * + * **Customize a data item:** + * + * When needing to customize a data item, it can be set as an object, + * where property `value` reprensent real value. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * **Empty value:** + * + * `'-'` or `null` or `undefined` or `NaN` can be used to describe + * that a data item is not exists (ps:_not exist_ does not means + * its value is `0`). + * + * For example, line chart can break when encounter an empty value, + * and scatter chart do not display graphic elements for empty values. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data + */ + data?: SeriesBar.Data | SeriesBar.Data[]; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.valueDim) + * can be used to assign the dimension. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.name + */ + name?: string; + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.type + */ + type?: string; + + /** + * Available when using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.type) + * it is used to assign maximum value and minimum value + * in dimensions, it could be `0` (xAxis, radiusAxis), `1` + * (yAxis, angleAxis), and use the first value axis dimension + * by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.type) + * is assigned. + * It is used to state the dimension used to calculate maximum + * value or minimum value. + * It may be the direct name of a dimension, like `x`, or + * `angle` for line charts, or `open`, or `close` for candlestick + * charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, whose + * format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint / + * markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.valueDim) + * can be used to assign the dimension. + * + * 4. + * You may also create a mark line in Cartesian coordinate at + * a specific position in X or Y axis by assigning `xAxis` or + * `yAxis`. See + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * for example. + * + * When multiple attributes exist, priority is as the above + * order. + * + * You may also set the type of mark line through `type`, stating + * whether it is for the maximum value or average value. + * Likewise, dimensions can be assigned through `valueIndex`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0 + */ + 0?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1 + */ + 1?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * 2. + * Specify the coordinate in data coordinate system (i.e., + * cartesian) using + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.coord) + * , which can be also set as `'min'`, `'max'`, `'average'` + * (e.g, + * `coord: [23, 'min']`, or `coord: ['average', 'max']`)。 + * + * 1. + * Locate the point on the min value or max value of `series.data` + * using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.type) + * , where + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markPoint.data.0.valueDim) + * can be used to specify the dimension on which the min, max + * or average are calculated. + * 2. + * If in cartesian, you can only specify `xAxis` or `yAxis` + * to define a mark area based on only X or Y axis, see sample + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0 + */ + 0?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1 + */ + 1?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in bar chart. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in bar chart, which controls + * order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.z + */ + z?: number; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + + namespace SeriesBar { + interface Data { + + /** + * The name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.name + */ + name?: string; + + /** + * The value of a single data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.value + */ + value?: number; + + /** + * The style setting of the text label in a single bar. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle + */ + itemStyle?: { + + /** + * Bar color.. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.color + */ + color?: string; + + /** + * The bodrder color of bar. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.barBorderColor + */ + barBorderColor?: string; + + /** + * The bodrder width of bar. defaults to have no border. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.barBorderWidth + */ + barBorderWidth?: number; + + /** + * The radius of rounded corner. + * Its unit is px. + * And it supports use array to respectively specify the + * 4 corner radiuses. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.barBorderRadius + */ + barBorderRadius?: any[] | number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * Bar color.. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * The bodrder color of bar. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.barBorderColor + */ + barBorderColor?: string; + + /** + * The bodrder width of bar. + * defaults to have no border. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.barBorderWidth + */ + barBorderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.bar.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } + } +} diff --git a/types/echarts/options/series/boxplot.d.ts b/types/echarts/options/series/boxplot.d.ts new file mode 100644 index 0000000000..38952a0e02 --- /dev/null +++ b/types/echarts/options/series/boxplot.d.ts @@ -0,0 +1,13252 @@ +declare namespace echarts { + namespace EChartOption { + /** + * [Boxplot](https://en.wikipedia.org/wiki/Box_plot) + * is a convenient way of graphically depicting groups of numerical + * data through their quartiles. + * + * **Example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot) + * + * Multiple `series` can be displayed in the same coordinate system. + * Please refer to + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=boxplot-multi&edit=1&reset=1) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot + */ + interface SeriesBoxplot { + + /** + * @default + * "boxplot" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.id + */ + id?: string; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-cartesian2d.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-cartesian2d.yAxisIndex) + * to assign the corresponding axis component. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.name + */ + name?: string; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * Whether to enable the animation when hovering on box. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.hoverAnimation + */ + hoverAnimation?: boolean; + + /** + * Layout methods, whose optional values are: + * + * + `'horizontal'`: horizontally layout all boxes. + * + * + `'vertical'`: vertically layout all boxes. + * + * The default value is decided by: + * + * + if there is a `category` axis: + * + if it is horizontal, use `'horizontal'`; + * + otherwise use `'vertical'`; + * + otherwise use `'horizontal'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.layout + */ + layout?: string; + + /** + * Up and bottom boundary of box width. + * The array is in the form of `[min, max]`. + * + * It could be absolute value in pixel, such as `[7, 50]`, or percentage, + * such as `['40%', '90%']`. + * The percentage means the percentage to the maximum possible width. + * + * + * @default + * [7, 50] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxWidth + */ + boxWidth?: any[]; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle + */ + itemStyle?: { + + /** + * boxplot color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.itemStyle) + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.color + */ + color?: string; + + /** + * boxplot border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.borderColor + */ + borderColor?: string; + + /** + * boxplot border width. No border when it is set to be 0. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle + */ + itemStyle?: { + + /** + * boxplot color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.emphasis.itemStyle) + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.color + */ + color?: string; + + /** + * boxplot border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * boxplot border width. + * No border when it is set to be 0. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.emphasis.itemStyle) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @default + * "rgba(0,0,0,0.4)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * `dimensions` can be used to define dimension info for `series.data` + * or `dataset.source`. + * + * Notice: if + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, we can provide dimension names in the first column/row + * of + * [dataset.source](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset.source) + * , and not need to specify `dimensions` here. + * But if `dimensions` is specified here, echarts will not retrieve + * dimension names from the first row/column of `dataset.source` + * any more. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * Each data item of `dimensions` can be: + * + * + `string`, for example, `'someName'`, which equals to `{name: + * 'someName'}`. + * + `Object`, where the attributes can be: + * + name: `string`. + * + type: `string`, supports: + * + `number` + * + `float`, that is, + * [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) + * + * + `int`, that is, + * [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) + * + * + `ordinal`, discrete value, which represents string generally. + * + `time`, time value, see + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * to check the format of time value. + * + displayName: `string`, generally used in tooltip for dimension + * display. If not specified, use `name` by default. + * + * When `dimensions` is specified, the default `tooltip` will be + * displayed vertically, which is better to show diemsion names. + * Otherwise, `tooltip` will displayed only value horizontally. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.dimensions + */ + dimensions?: any[]; + + /** + * Define what is encoded to for each dimension of `data`. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * Attributes of encode are different according to the type of coordinate + * systtems. For + * [cartesian2d](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , `x` and `y` can be defined. For + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * , `radius` and `angle` can be defined. For + * [geo](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * , `lng` and `lat` can be defined. + * Attribute `tooltip` and `itemName` (data item name in tooltip) + * are always able to be defined. + * + * When + * [dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.dimensions) + * is used to defined name for a certain dimension, `encode` can + * refer the name directly. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * Specially, in \[custom series(~series-custom), some property + * in `encode`, corresponding to axis, can be set as null to make + * the series not controlled by the axis, that is, the series data + * will not be count in the extent of the axis, and the + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * on the axis will not filter the series. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.encode + */ + encode?: object; + + /** + * Data should be the two-dimensional array shown as follow. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * Every data item (each line in the example above) in the two-dimensional + * array will be rendered into a box, and each line have five values + * as: + * + * ``` + * [min, Q1, median (or Q2), Q3, max] + * + * ``` + * + * **Data Processing** + * + * ECharts doesn't contain data processing modules, so the five + * statistic values should be calculated by yourself and then passes + * into `boxplot`. + * + * However, ECharts also provide some simple + * [raw data processing tools](https://github.com/ecomfe/echarts/tree/master/extension/dataTool) + * . For example, this + * [example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=boxplot-light-velocity&edit=1&reset=1) + * uses `echarts.dataTool.prepareBoxplotData` + * to proceed simple data statistics. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data + */ + data?: { + + /** + * Name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.name + */ + name?: string; + + /** + * Value of data item. + * + * ``` + * [min, Q1, median (or Q2), Q3, max] + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.value + */ + value?: any[]; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle + */ + itemStyle?: { + + /** + * boxplot color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.itemStyle) + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.color + */ + color?: string; + + /** + * boxplot border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * boxplot border width. + * No border when it is set to be 0. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * boxplot color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.emphasis.itemStyle) + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * boxplot border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * boxplot border width. + * No border when it is set to be 0. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.emphasis.itemStyle) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @default + * "rgba(0,0,0,0.4)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.valueDim) + * can be used to assign the dimension. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.name + */ + name?: string; + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.type + */ + type?: string; + + /** + * Available when using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.type) + * it is used to assign maximum value and minimum value + * in dimensions, it could be `0` (xAxis, radiusAxis), `1` + * (yAxis, angleAxis), and use the first value axis dimension + * by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.type) + * is assigned. + * It is used to state the dimension used to calculate maximum + * value or minimum value. + * It may be the direct name of a dimension, like `x`, or + * `angle` for line charts, or `open`, or `close` for candlestick + * charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, whose + * format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint / + * markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.valueDim) + * can be used to assign the dimension. + * + * 4. + * You may also create a mark line in Cartesian coordinate at + * a specific position in X or Y axis by assigning `xAxis` or + * `yAxis`. See + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * for example. + * + * When multiple attributes exist, priority is as the above + * order. + * + * You may also set the type of mark line through `type`, stating + * whether it is for the maximum value or average value. + * Likewise, dimensions can be assigned through `valueIndex`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0 + */ + 0?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1 + */ + 1?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * 2. + * Specify the coordinate in data coordinate system (i.e., + * cartesian) using + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.coord) + * , which can be also set as `'min'`, `'max'`, `'average'` + * (e.g, + * `coord: [23, 'min']`, or `coord: ['average', 'max']`)。 + * + * 1. + * Locate the point on the min value or max value of `series.data` + * using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.type) + * , where + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markPoint.data.0.valueDim) + * can be used to specify the dimension on which the min, max + * or average are calculated. + * 2. + * If in cartesian, you can only specify `xAxis` or `yAxis` + * to define a mark area based on only X or Y axis, see sample + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0 + */ + 0?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1 + */ + 1?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in Box plot. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in Box plot, which controls + * order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.z + */ + z?: number; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.silent + */ + silent?: boolean; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * + * @default + * 800 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "elasticOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.animationDelay + */ + animationDelay?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.boxplot.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-boxplot.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/candlestick.d.ts b/types/echarts/options/series/candlestick.d.ts new file mode 100644 index 0000000000..f67e226361 --- /dev/null +++ b/types/echarts/options/series/candlestick.d.ts @@ -0,0 +1,13487 @@ +declare namespace echarts { + namespace EChartOption { + /** + * A + * [candlestick](https://en.wikipedia.org/wiki/Candlestick_chart) + * chart (also called Japanese candlestick chart) is a style of financial + * chart used to describe price movements of a security, derivative, + * or currency. + * + * ECharts3 supports both `'candlestick'` and `'k'` in + * [series.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#(series.type) + * (`'k'` would automatically turns into `'candlestick'`). + * + * **An example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick) + * + * **About color of increase and decrease** + * + * Different countries or regions have different implications on the + * color of candle stick chart. + * It may use red to imply increasing with red and decreasing with blue + * (in China mainland, Taiwan, Japan, Koera, and so on), or to imply + * increasing with green and decreasing with red (in Europ, North America, + * Hong Kong, Singapore, and so on). + * Besides color, the increase and decrease of stock may also be represented + * with candle stick with or without filling colors. + * + * We use red to represent increasing and blue decreasing by default. + * If you want to change the configuration, you may change the following + * parameters. + * + * + [series-candlestick.itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.color) + * : fill color for bullish candle stick (namely, increase) + * + [series-candlestick.itemStyle.color0](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.color0) + * : fill color for bearish candle stick (namely, decrease) + * + [series-candlestick.itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.borderColor) + * : border color for bullish candle stick (namely, increase) + * + [series-candlestick.itemStyle.borderColor0](https://ecomfe.github.io/echarts-doc/public/en/option.htmlseries-candlestick.itemStyle.borderColor0) + * : border color for bearish candle stick (namely, decrease) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick + */ + interface SeriesCandlestick { + + /** + * @default + * "candlestick" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.id + */ + id?: string; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-cartesian2d.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-cartesian2d.yAxisIndex) + * to assign the corresponding axis component. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.name + */ + name?: string; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * Whether to enable animitation when hovering on box. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.hoverAnimation + */ + hoverAnimation?: boolean; + + /** + * Layout method, whose values may be: + * + * + `'horizontal'`: horizontally layout all boxs. + * + * + `'vertical'`: vertically layout all boxs. + * + * The default value is decided by: + * + * + if there is a `category` axis: + * + if it is horizontal, use `'horizontal'`; + * + otherwise use `'vertical'`; + * + otherwise use `'horizontal'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.layout + */ + layout?: string; + + /** + * Specify bar width. + * Absolute value (like `10`) or percentage (like `'20%'`, according + * to band width) can be used. Auto adapt by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.barWidth + */ + barWidth?: number; + + /** + * Specify bar min width. + * Absolute value (like `10`) or percentage (like `'20%'`, according + * to band width) can be used. Auto adapt by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.barMinWidth + */ + barMinWidth?: number; + + /** + * Specify bar max width. + * Absolute value (like `10`) or percentage (like `'20%'`, according + * to band width) can be used. Auto adapt by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.barMaxWidth + */ + barMaxWidth?: number; + + /** + * Item style of candlestick. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle + */ + itemStyle?: { + + /** + * Fill color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.color + */ + color?: string; + + /** + * Fill color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.color0 + */ + color0?: string; + + /** + * Border color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.borderColor + */ + borderColor?: string; + + /** + * Border color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.borderColor0 + */ + borderColor0?: string; + + /** + * Border width of candlestick. + * There is no border when it is `0`. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * Emphasis style of candlestick. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle + */ + itemStyle?: { + + /** + * Fill color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.emphasis.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.color + */ + color?: string; + + /** + * Fill color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.emphasis.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.color0 + */ + color0?: string; + + /** + * Border color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.emphasis.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * Border color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.emphasis.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.borderColor0 + */ + borderColor0?: string; + + /** + * Border width of candlestick. + * There is no border when it is `0`. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * Whether to enable the optimization of large-scale data. + * It could be set when large data causes performance problem. + * + * After being enabled, `largeThreshold` can be used to indicate + * the minimum number for turning on the optimization. + * + * But when the optimization enabled, the style of single data item + * can't be customized any more. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.large + */ + large?: boolean; + + /** + * The threshold enabling the drawing optimization. + * + * + * @default + * 600 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.largeThreshold + */ + largeThreshold?: number; + + /** + * `progressive` specifies the amount of graphic elements that can + * be rendered within a frame (about 16ms) if "progressive rendering" + * enabled. + * + * When data amount is from thousand to more than 10 million, it + * will take too long time to render all of the graphic elements. + * Since ECharts 4, "progressive rendering" is supported in its + * workflow, which processes and renders data chunk by chunk alone + * with each frame, avoiding to block the UI thread of the browser. + * + * + * @default + * 5000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.progressive + */ + progressive?: number; + + /** + * If current data amount is over the threshold, "progressive rendering" + * is enabled. + * + * + * @default + * 10000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.progressiveThreshold + */ + progressiveThreshold?: number; + + /** + * Chunk approach, optional values: + * + * + `'sequential'`: slice data by data index. + * + `'mod'`: slice data by mod, which make the data items of each + * chunk coming from all over the data, bringing better visual effect + * while progressive rendering. + * + * + * @default + * "mod" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.progressiveChunkMode + */ + progressiveChunkMode?: string; + + /** + * `dimensions` can be used to define dimension info for `series.data` + * or `dataset.source`. + * + * Notice: if + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, we can provide dimension names in the first column/row + * of + * [dataset.source](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset.source) + * , and not need to specify `dimensions` here. + * But if `dimensions` is specified here, echarts will not retrieve + * dimension names from the first row/column of `dataset.source` + * any more. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * Each data item of `dimensions` can be: + * + * + `string`, for example, `'someName'`, which equals to `{name: + * 'someName'}`. + * + `Object`, where the attributes can be: + * + name: `string`. + * + type: `string`, supports: + * + `number` + * + `float`, that is, + * [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) + * + * + `int`, that is, + * [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) + * + * + `ordinal`, discrete value, which represents string generally. + * + `time`, time value, see + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * to check the format of time value. + * + displayName: `string`, generally used in tooltip for dimension + * display. If not specified, use `name` by default. + * + * When `dimensions` is specified, the default `tooltip` will be + * displayed vertically, which is better to show diemsion names. + * Otherwise, `tooltip` will displayed only value horizontally. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.dimensions + */ + dimensions?: any[]; + + /** + * Define what is encoded to for each dimension of `data`. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * Attributes of encode are different according to the type of coordinate + * systtems. For + * [cartesian2d](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , `x` and `y` can be defined. For + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * , `radius` and `angle` can be defined. For + * [geo](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * , `lng` and `lat` can be defined. + * Attribute `tooltip` and `itemName` (data item name in tooltip) + * are always able to be defined. + * + * When + * [dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.dimensions) + * is used to defined name for a certain dimension, `encode` can + * refer the name directly. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * Specially, in \[custom series(~series-custom), some property + * in `encode`, corresponding to axis, can be set as null to make + * the series not controlled by the axis, that is, the series data + * will not be count in the extent of the axis, and the + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * on the axis will not filter the series. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.encode + */ + encode?: object; + + /** + * Data should be the two-dimensional array shown as follow. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * Every data item (each line in the example above) represents a + * box, which contains 4 values. They are: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data + */ + data?: { + + /** + * Name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.name + */ + name?: string; + + /** + * Value of data item. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.value + */ + value?: any[]; + + /** + * Style of a candle box. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle + */ + itemStyle?: { + + /** + * Fill color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.color + */ + color?: string; + + /** + * Fill color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.color0 + */ + color0?: string; + + /** + * Border color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * Border color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.borderColor0 + */ + borderColor0?: string; + + /** + * Border width of candlestick. + * There is no border when it is `0`. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * Emphasis style of a candle box. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * Fill color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.emphasis.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * Fill color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.emphasis.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.color0 + */ + color0?: string; + + /** + * Border color of bullish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.emphasis.itemStyle) + * + * + * @default + * "#c23531" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * Border color of bearish candle stick. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.emphasis.itemStyle) + * + * + * @default + * #314656 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.borderColor0 + */ + borderColor0?: string; + + /** + * Border width of candlestick. + * There is no border when it is `0`. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.valueDim) + * can be used to assign the dimension. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.name + */ + name?: string; + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.type + */ + type?: string; + + /** + * Available when using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.type) + * it is used to assign maximum value and minimum value + * in dimensions, it could be `0` (xAxis, radiusAxis), `1` + * (yAxis, angleAxis), and use the first value axis dimension + * by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.type) + * is assigned. + * It is used to state the dimension used to calculate maximum + * value or minimum value. + * It may be the direct name of a dimension, like `x`, or + * `angle` for line charts, or `open`, or `close` for candlestick + * charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, whose + * format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint / + * markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.valueDim) + * can be used to assign the dimension. + * + * 4. + * You may also create a mark line in Cartesian coordinate at + * a specific position in X or Y axis by assigning `xAxis` or + * `yAxis`. See + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * for example. + * + * When multiple attributes exist, priority is as the above + * order. + * + * You may also set the type of mark line through `type`, stating + * whether it is for the maximum value or average value. + * Likewise, dimensions can be assigned through `valueIndex`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0 + */ + 0?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1 + */ + 1?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * 2. + * Specify the coordinate in data coordinate system (i.e., + * cartesian) using + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.coord) + * , which can be also set as `'min'`, `'max'`, `'average'` + * (e.g, + * `coord: [23, 'min']`, or `coord: ['average', 'max']`)。 + * + * 1. + * Locate the point on the min value or max value of `series.data` + * using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.type) + * , where + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markPoint.data.0.valueDim) + * can be used to specify the dimension on which the min, max + * or average are calculated. + * 2. + * If in cartesian, you can only specify `xAxis` or `yAxis` + * to define a mark area based on only X or Y axis, see sample + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0 + */ + 0?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1 + */ + 1?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in candlestick. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in candlestick, which controls + * order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.z + */ + z?: number; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.silent + */ + silent?: boolean; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "linear" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.animationDelay + */ + animationDelay?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.candlestick.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-candlestick.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/custom.d.ts b/types/echarts/options/series/custom.d.ts new file mode 100644 index 0000000000..0aaa4324d7 --- /dev/null +++ b/types/echarts/options/series/custom.d.ts @@ -0,0 +1,7949 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **custom series** + * + * `custom series` supports customizing graphic elements, and then generate + * more types of charts. + * + * echarts manages the creation, deletion, animation and interaction + * with other components (like + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * 、 + * [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * ), which frees developers from handle those issue themselves. + * + * **For example, a "x-range" chart is made by custom sereis:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom) + * + * ** + * [More samples of custom series](https://ecomfe.github.io/echarts-examples/public/index.html#chart-type-custom) + * ** + * + * ** + * [A tutotial of custom series](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Custom%20Series) + * ** + * + * **Customize the render logic (in renderItem method)** + * + * `custom series` requires developers to write a render logic by themselves. + * This render logic is called + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * . + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom) + * + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * will be called on each data item. + * + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * provides two parameters: + * + * + [params](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.params) + * : provides info about the current series and data and coordinate + * system. + * + [api](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api) + * : includes some methods. + * + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * method should returns graphic elements definitions.See + * [renderItem.return](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return) + * . + * + * Generally, the main process of + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * is that retrieve value from data and convert them to graphic elements + * on the current coordinate system. Two methods in + * [renderItem.arguments.api](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api) + * are always used in this procedure: + * + * + [api.value(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.value) + * is used to retrieve value from data. + * For example, `api.value(0)` + * retrieve the value of the first dimension in the current data item. + * + [api.coord(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.coord) + * is used to convert data to coordinate. + * For example, `var point = api.coord([api.value(0), + * api.value(1)])` + * converet the data to the point on the current coordinate system. + * + * Sometimes + * [api.size(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.size) + * method is needed, which calculates the size on the coordinate system + * by a given data range. + * + * Moreover, + * [api.style(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.style) + * method can be used to set style. + * It provides not only the style settings specified in + * [series.itemStyle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle) + * , but also the result of visual mapping. + * This method can also be called like `api.style({fill: + * 'green', stroke: 'yellow'})` to override those style settings. + * + * **Dimension mapping (by encode and dimension option)** + * + * In most cases, + * [series.encode](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.encode) + * is needed to be specified when using `custom series` serise, which + * indicate the mapping of dimensions, and then echarts can render appropriate + * axis by the extent of those data. + * + * `encode.tooltip` + * and `encode.label` + * can also be specified to define the content of default `tooltip` + * and `label`. + * [series.dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.dimensions) + * can also be specified to defined names of each dimensions, which + * will be displayed in tooltip. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom) + * + * **Controlled by dataZoom** + * + * When use `custom series` with + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * , + * [dataZoom.filterMode](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom.filterMode) + * usually be set as `'weakFilter'`, which prevent `dataItem` from being + * filtered when only part of its dimensions are out of the current + * data window. + * + * **Difference between `dataIndex` and `dataIndexInside`** + * + * + `dataIndex` is the index of a `dataItem` in the original data. + * + `dataIndexInside` is the index of a `dataItem` in the current data + * window (see + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * . + * + * [renderItem.arguments.api](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api) + * uses `dataIndexInside` as the input parameter but not `dataIndex`, + * because conversion from `dataIndex` to `dataIndexInside` is time-consuming. + * + * **Event listener** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom + */ + interface SeriesCustom { + + /** + * @default + * "custom" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.name + */ + name?: string; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * The coordinate used in the series, whose options are: + * + * + `null` or `'none'` + * + * No coordinate. + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.yAxisIndex) + * to assign the corresponding axis component. + * + * + `'polar'` + * + * Use polar coordinates, with + * [polarIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.polarIndex) + * to assign the corresponding polar coordinate component. + * + * + `'geo'` + * + * Use geographic coordinate, with + * [geoIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.geoIndex) + * to assign the corresponding geographic coordinate components. + * + * + `'none'` + * + * Do not use coordinate system. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Index of + * [polar coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * to combine with, which is useful for multiple polar axes in one + * chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.polarIndex + */ + polarIndex?: number; + + /** + * Index of + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * to combine with, which is useful for multiple geographic axes + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.geoIndex + */ + geoIndex?: number; + + /** + * Index of + * [calendar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#calendar) + * to combine with, which is useful for multiple calendar coordinates + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.calendarIndex + */ + calendarIndex?: number; + + /** + * `custom series` requires developers to write a render logic by + * themselves. This render logic is called + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * . + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * will be called on each data item. + * + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * provides two parameters: + * + * + [params](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.params) + * : provides info about the current series and data and coordinate + * system. + * + [api](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api) + * : includes some methods. + * + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * method should returns graphic elements definitions.See + * [renderItem.return](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return) + * . + * + * Generally, the main process of + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * is that retrieve value from data and convert them to graphic + * elements on the current coordinate system. Two methods in + * [renderItem.arguments.api](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api) + * are always used in this procedure: + * + * + [api.value(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.value) + * is used to retrieve value from data. + * For example, `api.value(0)` + * retrieve the value of the first dimension in the current data + * item. + * + [api.coord(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.coord) + * is used to convert data to coordinate. + * For example, `var point = api.coord([api.value(0), + * api.value(1)])` + * converet the data to the point on the current coordinate system. + * + * Sometimes + * [api.size(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.size) + * method is needed, which calculates the size on the coordinate + * system by a given data range. + * + * Moreover, + * [api.style(...)](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.style) + * method can be used to set style. + * It provides not only the style settings specified in + * [series.itemStyle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle) + * , but also the result of visual mapping. + * This method can also be called like `api.style({fill: + * 'green', stroke: 'yellow'})` to override those style settings. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem + */ + renderItem?: { + + /** + * Parameters of `renderItem`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments + */ + arguments?: { + + /** + * The first parameter of `renderItem`, including: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments) + * + * Difference between `dataIndex` and `dataIndexInside`: + * + * + `dataIndex` is the index of a `dataItem` in the original + * data. + * + `dataIndexInside` is the index of a `dataItem` in the + * current data window (see + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * . + * + * [renderItem.arguments.api](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api) + * uses `dataIndexInside` as the input parameter but not + * `dataIndex`, because conversion from `dataIndex` to `dataIndexInside` + * is time-consuming. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.params + */ + params?: object; + + /** + * The second parameter of `renderItem`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api + */ + api?: { + + /** + * Get value on the given dimension. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.value + */ + value?: Function; + + /** + * Convert data to coordinate. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.coord + */ + coord?: Function; + + /** + * Get the size by the given data range. + * + * For example, in `cartesian2d`, suppose calling `api.size([2, + * 4])` returns `[12.4, + * 55]`. + * It represents that on x axis, data range `2` corresponds + * to size `12.4`, + * and on y axis data range `4` corresponds to size + * `55`. + * + * In some coordinate systems (for example, polar) or + * when log axis is used, the size is different in different + * point. + * So the second parameter is necessary to calculate + * size on the given point. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.size + */ + size?: Function; + + /** + * The method obtains style info defined in + * [series.itemStyle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle) + * , and visual info obtained by visual mapping, and + * return them. + * Those returned info can be assigned to `style` attribute + * of graphic element definition directly. + * Developers can also override style info by calling + * this method like this: `api.style({fill: + * 'green', stroke: 'yellow'})`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.style + */ + style?: Function; + + /** + * The method obtains style info defined in + * [series.itemStyle.emphasis](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.emphasis) + * , and visual info obtained by visual mapping, and + * return them. + * Those returned info can be assigned to `style` attribute + * of graphic element definition directly. + * Developers can also override style info by calling + * this method like this: `api.style({fill: + * 'green', stroke: 'yellow'})`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.styleEmphasis + */ + styleEmphasis?: Function; + + /** + * Get the visual info. It is rarely be used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.visual + */ + visual?: Function; + + /** + * When `barLayout` is needed, (for example, when attaching + * some extra graphic elements to bar chart), this method + * can be used to obtain bar layout info. + * + * See a + * [sample](https://ecomfe.github.io/echarts-examples/public/editor.html?c=custom-bar-trend) + * . + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.barLayout + */ + barLayout?: Function; + + /** + * Obtain the current series index. + * Notice that the `currentSeriesIndex` is different + * from `seriesIndex` when legend is used to filter + * some series. + * + * ``` + * @return {number} + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.currentSeriesIndices + */ + currentSeriesIndices?: Function; + + /** + * Obtain font string, which can be used on style setting + * directly. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.arguments.api) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.font + */ + font?: Function; + + /** + * ``` + * @return {number} Width of echarts containter. + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.getWidth + */ + getWidth?: Function; + + /** + * ``` + * @return {number} Height of echarts container. + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.getHeight + */ + getHeight?: Function; + + /** + * ``` + * @return {module:zrender} zrender instance. + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.getZr + */ + getZr?: Function; + + /** + * ``` + * @return {number} The current devicePixelRatio。 + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.getDevicePixelRatio + */ + getDevicePixelRatio?: Function; + }; + }; + + /** + * `renderItem` should returns graphic element definitions. + * Each graphic element is an object. See + * [graphic](https://ecomfe.github.io/echarts-doc/public/en/option.html#graphic.elements) + * for detailed info. + * (But width\\height\\top\\bottom is not supported here) + * + * If nothing should be rendered in this data item, just returns + * nothing. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return + */ + return?: object; + + /** + * `group` is the only type that can contain children, so that + * a group of elements can be positioned and transformed together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group + */ + return_group?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "group" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_group) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.ignore + */ + ignore?: boolean; + + /** + * Specify width of this `group`. + * + * This width is only used for the positioning of its children. + * + * When width is `0`, children can also be positioned according + * to its parent using `left: 'center'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.width + */ + width?: number; + + /** + * Specify height of this `group`. + * + * This height is only used for the positioning of its children. + * + * When height is `0`, children can also be positioned according + * to its parent using `top: 'middle'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.height + */ + height?: number; + + /** + * In + * [custom series](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom) + * , when `diffChildrenByName` is set as `true`, for each + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * returned from + * [renderItem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem) + * , "diff" will be performed to its + * [children](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.children) + * according to the + * [name](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.name) + * attribute of each graphic elements. + * Here "diff" means that map the coming graphic elements + * to the existing graphic elements when repainting according + * to `name`, which enables the transition animation if + * data is modified. + * + * But notice that the operation is performance consuming, + * do not use it for large data amount. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.diffChildrenByName + */ + diffChildrenByName?: boolean; + + /** + * A list of children, each item is a declaration of an + * element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.children + */ + children?: any[]; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Use + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * to describe a path. + * Can be used to draw icons or any other shapes fitting the + * specified size by auto transforming. + * + * See examples: + * [icons](https://ecomfe.github.io/echarts-examples/public/editor.html?c=custom-calendar-icon) + * and + * [shapes](https://ecomfe.github.io/echarts-examples/public/editor.html?c=custom-gantt-flight) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path + */ + return_path?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "path" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_path) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape + */ + shape?: { + + /** + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * . + * + * For example, `'M0,0 L0,-20 L30,-20 C42,-20 38,-1 + * 50,-1 L70,-1 L70,0 Z'`。 + * + * If + * [width](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.width) + * , + * [height](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.height) + * , + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.x) + * and + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.y) + * specified, `pathData` will be transformed to fit + * the defined rect. + * If they are not specified, do not do that. + * + * [layout](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.layout) + * can be used to specify the transform strategy. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.pathData + */ + pathData?: string; + + /** + * Alias of + * [pathData](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.pathData) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.d + */ + d?: string; + + /** + * If + * [width](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.width) + * , + * [height](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.height) + * , + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.x) + * and + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.y) + * specified, `pathData` will be transformed to fit + * the defined rect. + * + * `layout` can be used to specify the transform strategy. + * + * Optional value: + * + * + `'center'`: Keep aspect ratio, put the path in + * the center of the rect, expand as far as possible + * but never overflow. + * + `'cover'`: Transform the path according to the + * aspect ratio of the rect, fill the rect and do not + * overflow. + * + * + * @default + * "center" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.layout + */ + layout?: string; + + /** + * The x value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.x + */ + x?: number; + + /** + * The y value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.y + */ + y?: number; + + /** + * The width of the shape of the element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.width + */ + width?: number; + + /** + * The height of the shape of the element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.shape.height + */ + height?: number; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_path.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image + */ + return_image?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "image" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_image) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style + */ + style?: { + + /** + * Specify contant of the image, can be a URL, or + * [dataURI](https://tools.ietf.org/html/rfc2397) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.image + */ + image?: string; + + /** + * The x value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.x + */ + x?: number; + + /** + * The y value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.y + */ + y?: number; + + /** + * The width of the shape of the element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.width + */ + width?: number; + + /** + * The height of the shape of the element. + * + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be + * different from the attribute names in `echarts label`, + * `echarts itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.height + */ + height?: number; + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text + */ + return_text?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "text" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_text) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style + */ + style?: { + + /** + * Text content. `\n` can be used as a line break. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.text + */ + text?: string; + + /** + * The x value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.x + */ + x?: number; + + /** + * The y value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.y + */ + y?: number; + + /** + * Font size, font type, font weight, font color, follow + * the form of + * [css font](https://developer.mozilla.org/en-US/docs/Web/CSS/font) + * . + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_text.style) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.font + */ + font?: string; + + /** + * Text horizontal alignment. + * Optional values: `'left'`, `'center'`, `'right'`. + * + * `'left'` means the left side of the text block is + * specified by the + * [style.x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.x) + * , while `'right'` means the right side of the text + * block is specified by + * [style.y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.y) + * . + * + * + * @default + * "left" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.textAlign + */ + textAlign?: string; + + /** + * Text vertical alignment. + * Optional values: `'top'`, `'middle'`, `'bottom'`. + * + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be + * different from the attribute names in `echarts label`, + * `echarts itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.textVerticalAlign + */ + textVerticalAlign?: string; + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Rectangle element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect + */ + return_rect?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "rect" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_rect) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.shape + */ + shape?: { + + /** + * The x value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.shape.x + */ + x?: number; + + /** + * The y value of the left-top corner of the element + * in the coordinate system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.shape.y + */ + y?: number; + + /** + * The width of the shape of the element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.shape.width + */ + width?: number; + + /** + * The height of the shape of the element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.shape.height + */ + height?: number; + + /** + * Specify border radius of the rectangular here. + * Generally, `r` should be `[topLeftRadius, topRightRadius, + * BottomRightRadius, bottomLeftRadius]`, where each + * item is a number. + * + * Abbreviation is enabled, for example: + * + * + `r`: `1` means `[1, 1, 1, 1]` + * + `r`: `[1]` means `[1, 1, 1, 1]` + * + `r`: `[1, 2]` means `[1, 2, 1, 2]` + * + `r`: `[1, 2, 3]` means `[1, 2, 3, 2]` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.shape.r + */ + r?: any[]; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Circle element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle + */ + return_circle?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_circle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.shape + */ + shape?: { + + /** + * The x value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.shape.cx + */ + cx?: number; + + /** + * The y value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.shape.cy + */ + cy?: number; + + /** + * Outside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.shape.r + */ + r?: number; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Ring element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring + */ + return_ring?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "ring" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_ring) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.shape + */ + shape?: { + + /** + * The x value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.shape.cx + */ + cx?: number; + + /** + * The y value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.shape.cy + */ + cy?: number; + + /** + * Outside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.shape.r + */ + r?: number; + + /** + * Inside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.shape.r0 + */ + r0?: number; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Sector element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector + */ + return_sector?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "sector" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_sector) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape + */ + shape?: { + + /** + * The x value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.cx + */ + cx?: number; + + /** + * The y value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.cy + */ + cy?: number; + + /** + * Outside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.r + */ + r?: number; + + /** + * Inside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.r0 + */ + r0?: number; + + /** + * start angle, in radian. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.startAngle + */ + startAngle?: number; + + /** + * end anble, in radian. + * + * + * @default + * "Math.PI * 2" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.endAngle + */ + endAngle?: number; + + /** + * Whether draw clockwise. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.shape.clockwise + */ + clockwise?: boolean; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Arc element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc + */ + return_arc?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "arc" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_arc) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape + */ + shape?: { + + /** + * The x value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.cx + */ + cx?: number; + + /** + * The y value of the center of the element in the coordinate + * system of its parent. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.cy + */ + cy?: number; + + /** + * Outside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.r + */ + r?: number; + + /** + * Inside radius. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.r0 + */ + r0?: number; + + /** + * start angle, in radian. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.startAngle + */ + startAngle?: number; + + /** + * end anble, in radian. + * + * + * @default + * "Math.PI * 2" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.endAngle + */ + endAngle?: number; + + /** + * Whether draw clockwise. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.shape.clockwise + */ + clockwise?: boolean; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Polygon element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon + */ + return_polygon?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "polygon" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_polygon) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.shape + */ + shape?: { + + /** + * A list of points, which defines the shape, like `[[22, + * 44], [44, 55], [11, 44], ...]`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.shape.points + */ + points?: any[]; + + /** + * Whether smooth the line. + * + * + If the value is number, bezier interpolation is + * used, and the value specified the level of smooth, + * which is in the range of `[0, 1]`. + * + If the value is `'spline'`, Catmull-Rom spline + * interpolation is used. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.shape.smooth + */ + smooth?: number | string; + + /** + * Whether prevent the smooth process cause the line + * out of the bounding box. + * + * Only works when `smooth` is `number` (bezier smooth). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.shape.smoothConstraint + */ + smoothConstraint?: boolean; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Polyline element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline + */ + return_polyline?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "polyline" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_polyline) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.shape + */ + shape?: { + + /** + * A list of points, which defines the shape, like `[[22, + * 44], [44, 55], [11, 44], ...]`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.shape.points + */ + points?: any[]; + + /** + * Whether smooth the line. + * + * + If the value is number, bezier interpolation is + * used, and the value specified the level of smooth, + * which is in the range of `[0, 1]`. + * + If the value is `'spline'`, Catmull-Rom spline + * interpolation is used. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.shape.smooth + */ + smooth?: number | string; + + /** + * Whether prevent the smooth process cause the line + * out of the bounding box. + * + * Only works when `smooth` is `number` (bezier smooth). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.shape.smoothConstraint + */ + smoothConstraint?: boolean; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Line element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line + */ + return_line?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "line" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_line) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.shape + */ + shape?: { + + /** + * x value of the start point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.shape.x1 + */ + x1?: number; + + /** + * y value of the start point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.shape.y1 + */ + y1?: number; + + /** + * x value of the end point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.shape.x2 + */ + x2?: number; + + /** + * y value of the end point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.shape.y2 + */ + y2?: number; + + /** + * Specify the percentage of drawing, useful in animation. + * + * Value range: \[0, 1\]. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.shape.percent + */ + percent?: number; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line.styleEmphasis + */ + styleEmphasis?: object; + }; + + /** + * Quadratic bezier curve or cubic bezier curve. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve + */ + return_bezierCurve?: { + + /** + * Must be specified when define a graphic element at the + * first time. + * + * Optional values: + * + * [image](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_image) + * , + * [text](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_text) + * , + * [circle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_circle) + * , + * [sector](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_sector) + * , + * [ring](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_ring) + * , + * [polygon](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon) + * , + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polyline) + * , + * [rect](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_rect) + * , + * [line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_line) + * , + * [bezierCurve](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve) + * , + * [arc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_arc) + * , + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * , + * + * + * @default + * "bezierCurve" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.type + */ + type?: string; + + /** + * id is used to specifying element when willing to update + * it. id can be ignored if you do not need it. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.id + */ + id?: string; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.position + */ + position?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.rotation + */ + rotation?: number; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [1, 1] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.scale + */ + scale?: any[]; + + /** + * `2D transform` can be applied to graphic elements, including: + * + * + [position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.position) + * : `[horizontal translate offset, vertical translate offset]`, + * `[0, 0]` by default. + * Positive value means translate towards right or bottom. + * + [rotation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.rotation) + * : Rotation in radian, `0` by default. + * Positive when anticlockwise. + * + [scale](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.scale) + * : `[horizontal scale factor, vertical scale factor]`, + * `[1, 1]` by default. + * + * [origin](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.origin) + * specifies the origin point of rotation and scaling, `[0, + * 0]` by default. + * + * Notice: + * + * + The coordinates specified in the transform attribute + * above are relative to the `[0, 0]` of the parent element + * (that is, + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * or the root canvas). Thus we are able to + * [group](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * multiple elements, and + * [groups](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_group) + * can be nested. + * + The order that the transform attributes are applied + * to a single graphic element is: Firstly, `rotation`, + * then, `scale`, finally, `position`. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.origin + */ + origin?: number; + + /** + * Define the overlap relationship between graphic elements. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.z2 + */ + z2?: number; + + /** + * See + * [diffChildrenByName](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.diffChildrenByName) + * 。 + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.name + */ + name?: string; + + /** + * User defined data, can be visited in event listeners. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.renderItem.return_bezierCurve) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.info + */ + info?: any; + + /** + * Whether response to mouse events / touch events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.silent + */ + silent?: boolean; + + /** + * Whether the element is visible. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.invisible + */ + invisible?: boolean; + + /** + * Whether the element is totally ignored (neither render + * nor listen events). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.ignore + */ + ignore?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape + */ + shape?: { + + /** + * x value of the start point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.x1 + */ + x1?: number; + + /** + * y value of the start point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.y1 + */ + y1?: number; + + /** + * x value of the end point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.x2 + */ + x2?: number; + + /** + * y value of the end point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.y2 + */ + y2?: number; + + /** + * x of control point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.cpx1 + */ + cpx1?: number; + + /** + * y of control point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.cpy1 + */ + cpy1?: number; + + /** + * x of the second control point. + * If specified, cubic bezier is used. + * + * If both `cpx2` and `cpy2` are not set, quatratic + * bezier is used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.cpx2 + */ + cpx2?: number; + + /** + * y of the second control point. + * If specified, cubic bezier is used. + * + * If both `cpx2` and `cpy2` are not set, quatratic + * bezier is used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.cpy2 + */ + cpy2?: number; + + /** + * Specify the percentage of drawing, useful in animation. + * + * Value range: \[0, 1\]. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.shape.percent + */ + percent?: number; + }; + + /** + * More attributes in `style` (for example, + * [rich text](https://ecomfe.github.io/echarts-doc/public/en/tutorial.html#Rich%20Text) + * ), see the `style` related attributes in + * [zrender/graphic/Displayable](https://ecomfe.github.io/zrender-doc/public/api.html#zrenderdisplayable) + * . + * + * Notice, the attribute names of the `style` of graphic + * elements is derived from `zrender`, which may be different + * from the attribute names in `echarts label`, `echarts + * itemStyle`, etc., + * although they have the same meaning. For example: + * + * + [itemStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.fill` + * + [itemStyle.borderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.stroke` + * + [label.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.color) + * => `style.textFill` + * + [label.textBorderColor](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-scatter.label.textBorderColor) + * => `style.textStroke` + * + ... + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style + */ + style?: { + + /** + * Color filled in this element. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.fill + */ + fill?: string; + + /** + * Color of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.stroke + */ + stroke?: string; + + /** + * Width of stroke. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.lineWidth + */ + lineWidth?: number; + + /** + * Width of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.shadowBlur + */ + shadowBlur?: number; + + /** + * X offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Y offset of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * color of shadow. + * + * + * @default + * "undefined" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.style.shadowColor + */ + shadowColor?: number; + }; + + /** + * Empahsis style of the graphic element, whose structure + * is the same as + * [style](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_polygon.style) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.return_bezierCurve.styleEmphasis + */ + styleEmphasis?: object; + }; + }; + + /** + * Graphic style of , `emphasis` is the style when it is highlighted, + * like being hovered by mouse, or highlighted via legend connect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * `dimensions` can be used to define dimension info for `series.data` + * or `dataset.source`. + * + * Notice: if + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, we can provide dimension names in the first column/row + * of + * [dataset.source](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset.source) + * , and not need to specify `dimensions` here. + * But if `dimensions` is specified here, echarts will not retrieve + * dimension names from the first row/column of `dataset.source` + * any more. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * Each data item of `dimensions` can be: + * + * + `string`, for example, `'someName'`, which equals to `{name: + * 'someName'}`. + * + `Object`, where the attributes can be: + * + name: `string`. + * + type: `string`, supports: + * + `number` + * + `float`, that is, + * [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) + * + * + `int`, that is, + * [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) + * + * + `ordinal`, discrete value, which represents string generally. + * + `time`, time value, see + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * to check the format of time value. + * + displayName: `string`, generally used in tooltip for dimension + * display. If not specified, use `name` by default. + * + * When `dimensions` is specified, the default `tooltip` will be + * displayed vertically, which is better to show diemsion names. + * Otherwise, `tooltip` will displayed only value horizontally. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.dimensions + */ + dimensions?: any[]; + + /** + * Define what is encoded to for each dimension of `data`. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * Attributes of encode are different according to the type of coordinate + * systtems. For + * [cartesian2d](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , `x` and `y` can be defined. For + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * , `radius` and `angle` can be defined. For + * [geo](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * , `lng` and `lat` can be defined. + * Attribute `tooltip` and `itemName` (data item name in tooltip) + * are always able to be defined. + * + * When + * [dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.dimensions) + * is used to defined name for a certain dimension, `encode` can + * refer the name directly. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * Specially, in \[custom series(~series-custom), some property + * in `encode`, corresponding to axis, can be set as null to make + * the series not controlled by the axis, that is, the series data + * will not be count in the extent of the axis, and the + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * on the axis will not filter the series. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.encode + */ + encode?: object; + + /** + * When + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, `seriesLayoutBy` specifies whether the column or the + * row of `dataset` is mapped to the series, namely, the series + * is "layout" on columns or rows. Optional values: + * + * + 'column': by default, the columns of `dataset` are mapped the + * series. In this case, each column represents a dimension. + * + 'row':the rows of `dataset` are mapped to the series. + * In this case, each row represents a dimension. + * + * Check this + * [example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=dataset-series-layout-by) + * . + * + * + * @default + * "column" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.seriesLayoutBy + */ + seriesLayoutBy?: string; + + /** + * If + * [series.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * is not specified, and + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * exists, the series will use `dataset`. + * `datasetIndex` specifies which dataset will be used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.datasetIndex + */ + datasetIndex?: number; + + /** + * Data array of series, which can be in the following forms: + * + * Notice, if no `data` specified in series, and there is + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * in option, series will use the first + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * as its datasource. If `data` has been specified, + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * will not used. + * + * `series.datasetIndex` can be used to specify other + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * . + * + * Basically, data is represented by a two-dimension array, like + * the example below, where each colum is named as a "dimension". + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * + In + * [cartesian (grid)](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , "dimX" and "dimY" correspond to + * [xAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * and + * [yAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * repectively. + * + In + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * "dimX" and "dimY" correspond to + * [radiusAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#radiusAxis) + * 和 + * [angleAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#anbleAxis) + * repectively. + * + Other dimensions are optional, which can be used in other place. + * For example: + * + [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * can map one or more dimensions to viusal (color, symbol size + * ...). + * + [series.symbolSize](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.symbolSize) + * can be set as a callback function, where symbol size can be calculated + * by values of a certain dimension. + * + Values in other dimensions can be shown by + * [tooltip.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.formatter) + * or + * [series.label.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.label.formatter) + * . + * + * Especially, when there is one and only one category axis (axis.type + * is `'category'`), data can be simply be represented by a one-dimension + * array, like: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * **Relationship between "value" and + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.type) + * ** + * + * + When a dimension corresponds to a value axis (axis.type + * is `'value'` or `'log'`): + * + * The value can be a `number` (like `12`) (can also be a number + * in a `string` format, like `'12'`). + * + * + When a dimension corresponds to a category axis (axis.type + * is `'category'`): + * + * The value should be the ordinal of the axis.data + * (based on `0`), the string value of the axis.data. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * There is an example of double category axes: + * [Github Punchcard](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-punchCard) + * . + * + * + When a dimension corresponds to a time axis (type is `'time'`), + * the value can be: + * + * + a timestamp, like `1484141700832`, which represents a UTC time. + * + a date string, in one of the formats below: + * + a subset of + * [ISO 8601](http://www.ecma-international.org/ecma-262/5.1/#se + * c-15.9.1.15) + * , only including (all of these are treated as local time unless + * timezone is specified, which is consistent with + * [moment](https://momentjs.com/) + * ): + * + only part of year/month/date/time are specified: `'2012-03'`, + * `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + * + separated by `"T"` or a space: `'2012-03-01T12:22:33.123'`, + * `'2012-03-01 12:22:33.123'`. + * + timezone specified: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, + * `'2012-03-01T12:22:33-05:00'`. + * + other date string format (all of these are treated as local + * time): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, + * `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`. + * + a JavaScript Date instance created by user: + * + Caution, when using a data string to create a Date instance, + * [browser differences and inconsistencies](http://dygraphs.com/date-formats.html) + * should be considered. + * + For example: In chrome, `new Date('2012-01-01')` is treated + * as a Jan 1st 2012 in UTC, while `new Date('2012-1-1')` and `new + * Date('2012/01/01')` are treated as Jan 1st 2012 in local timezone. + * In safari `new Date('2012-1-1')` is not supported. + * + So if you intent to perform `new Date(dateString)`, it is strongly + * recommended to use a time parse library (e.g., + * [moment](https://momentjs.com/) + * ), or use `echarts.number.parseDate`, or check + * [this](http://dygraphs.com/date-formats.html) + * . + * + * **Customize a data item:** + * + * When needing to customize a data item, it can be set as an object, + * where property `value` reprensent real value. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * **Empty value:** + * + * `'-'` or `null` or `undefined` or `NaN` can be used to describe + * that a data item is not exists (ps:_not exist_ does not means + * its value is `0`). + * + * For example, line chart can break when encounter an empty value, + * and scatter chart do not display graphic elements for empty values. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data + */ + data?: { + + /** + * Name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.name + */ + name?: string; + + /** + * Value of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.value + */ + value?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * `zlevel` value of all graghical elements in custom series. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in custom series, which controls + * order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.z + */ + z?: number; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.silent + */ + silent?: boolean; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.custom.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/effect-scatter.d.ts b/types/echarts/options/series/effect-scatter.d.ts new file mode 100644 index 0000000000..8b9b5eac69 --- /dev/null +++ b/types/echarts/options/series/effect-scatter.d.ts @@ -0,0 +1,16792 @@ +declare namespace echarts { + namespace EChartOption { + /** + * The scatter (bubble) graph with ripple animation. + * The special animation effect can visually highlights some data. + * + * **Tip:** The effects of map was achieved through markPoint in ECharts + * 2.x. + * However, in ECharts 3, effectScatter on geographic coordinate is + * recommended for achieving that effects of map. + * + * **Here is the example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter + */ + interface SeriesEffectScatter { + + /** + * @default + * "effectScatter" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.name + */ + name?: string; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * Type of effect. + * Only ripple effect of `'ripple'` is supported currently. + * + * + * @default + * "ripple" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectType + */ + effectType?: string; + + /** + * When to show the effect. + * + * **Options:** + * + * + `'render'` Show the effect when rendering is done. + * + `'emphasis'` Show the effect when it is highlight (hover). + * + * + * @default + * "render" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.showEffectOn + */ + showEffectOn?: string; + + /** + * Related configurations about ripple effect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.rippleEffect + */ + rippleEffect?: { + + /** + * The period duration of animation, in seconds. + * + * + * @default + * 4 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.rippleEffect.period + */ + period?: number; + + /** + * The maximum zooming scale of ripples in animation. + * + * + * @default + * 2.5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.rippleEffect.scale + */ + scale?: number; + + /** + * The brush type for ripples. + * options: `'stroke'` and `'fill'`. + * + * + * @default + * "fill" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.rippleEffect.brushType + */ + brushType?: string; + }; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.yAxisIndex) + * to assign the corresponding axis component. + * + * + `'polar'` + * + * Use polar coordinates, with + * [polarIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.polarIndex) + * to assign the corresponding polar coordinate component. + * + * + `'geo'` + * + * Use geographic coordinate, with + * [geoIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.geoIndex) + * to assign the corresponding geographic coordinate components. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Index of + * [polar coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * to combine with, which is useful for multiple polar axes in one + * chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.polarIndex + */ + polarIndex?: number; + + /** + * Index of + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * to combine with, which is useful for multiple geographic axes + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.geoIndex + */ + geoIndex?: number; + + /** + * Index of + * [calendar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#calendar) + * to combine with, which is useful for multiple calendar coordinates + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.calendarIndex + */ + calendarIndex?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which URL + * is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * Icons can be set to arbitrary vector path via `'path://'` in + * ECharts. + * As compared with raster image, vector paths prevent from jagging + * and blurring when scaled, and have a better control over changing + * colors. + * Size of vectoer icon will be adapted automatically. Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array to + * represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * + * @default + * 10 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use tangent + * angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of data. + * But if symbol is from user-defined vector path or image, you + * may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to default + * position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.symbolOffset + */ + symbolOffset?: any[]; + + /** + * The mouse style when mouse hovers on an element, the same as + * `cursor` property in `CSS`. + * + * + * @default + * "pointer" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.cursor + */ + cursor?: string; + + /** + * Text label of , to explain some data information about graphic + * item like value, name and so on. + * `label` is placed under `itemStyle` in ECharts 2.x. + * In ECharts 3, to make the configuration structure flatter, `label`is + * taken to be at the same level with `itemStyle`, and has `emphasis` + * as `itemStyle` does. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to represent + * position of label relative to top-left corner of bounding + * box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally and + * move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Graphic style of , `emphasis` is the style when it is highlighted, + * like being hovered by mouse, or highlighted via legend connect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.itemStyle) + * + * Supports callback functions, in the form of: + * + * ``` + * (params: Object) => Color + * + * ``` + * + * Input parameters are `seriesIndex`, `dataIndex`, `data`, + * `value`, and etc. of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.color + */ + color?: string | Function; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.itemStyle) + * + * Supports callback functions, in the form of: + * + * ``` + * (params: Object) => Color + * + * ``` + * + * Input parameters are `seriesIndex`, `dataIndex`, `data`, + * `value`, and etc. of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.color + */ + color?: string | Function; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * When + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, `seriesLayoutBy` specifies whether the column or the + * row of `dataset` is mapped to the series, namely, the series + * is "layout" on columns or rows. Optional values: + * + * + 'column': by default, the columns of `dataset` are mapped the + * series. In this case, each column represents a dimension. + * + 'row':the rows of `dataset` are mapped to the series. + * In this case, each row represents a dimension. + * + * Check this + * [example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=dataset-series-layout-by) + * . + * + * + * @default + * "column" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.seriesLayoutBy + */ + seriesLayoutBy?: string; + + /** + * If + * [series.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * is not specified, and + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * exists, the series will use `dataset`. + * `datasetIndex` specifies which dataset will be used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.datasetIndex + */ + datasetIndex?: number; + + /** + * `dimensions` can be used to define dimension info for `series.data` + * or `dataset.source`. + * + * Notice: if + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, we can provide dimension names in the first column/row + * of + * [dataset.source](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset.source) + * , and not need to specify `dimensions` here. + * But if `dimensions` is specified here, echarts will not retrieve + * dimension names from the first row/column of `dataset.source` + * any more. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * Each data item of `dimensions` can be: + * + * + `string`, for example, `'someName'`, which equals to `{name: + * 'someName'}`. + * + `Object`, where the attributes can be: + * + name: `string`. + * + type: `string`, supports: + * + `number` + * + `float`, that is, + * [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) + * + * + `int`, that is, + * [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) + * + * + `ordinal`, discrete value, which represents string generally. + * + `time`, time value, see + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * to check the format of time value. + * + displayName: `string`, generally used in tooltip for dimension + * display. If not specified, use `name` by default. + * + * When `dimensions` is specified, the default `tooltip` will be + * displayed vertically, which is better to show diemsion names. + * Otherwise, `tooltip` will displayed only value horizontally. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.dimensions + */ + dimensions?: any[]; + + /** + * Define what is encoded to for each dimension of `data`. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * Attributes of encode are different according to the type of coordinate + * systtems. For + * [cartesian2d](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , `x` and `y` can be defined. For + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * , `radius` and `angle` can be defined. For + * [geo](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * , `lng` and `lat` can be defined. + * Attribute `tooltip` and `itemName` (data item name in tooltip) + * are always able to be defined. + * + * When + * [dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.dimensions) + * is used to defined name for a certain dimension, `encode` can + * refer the name directly. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * Specially, in \[custom series(~series-custom), some property + * in `encode`, corresponding to axis, can be set as null to make + * the series not controlled by the axis, that is, the series data + * will not be count in the extent of the axis, and the + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * on the axis will not filter the series. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.encode + */ + encode?: object; + + /** + * Data array of series, which can be in the following forms: + * + * Notice, if no `data` specified in series, and there is + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * in option, series will use the first + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * as its datasource. If `data` has been specified, + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * will not used. + * + * `series.datasetIndex` can be used to specify other + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * . + * + * Basically, data is represented by a two-dimension array, like + * the example below, where each colum is named as a "dimension". + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * + In + * [cartesian (grid)](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , "dimX" and "dimY" correspond to + * [xAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * and + * [yAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * repectively. + * + In + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * "dimX" and "dimY" correspond to + * [radiusAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#radiusAxis) + * 和 + * [angleAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#anbleAxis) + * repectively. + * + Other dimensions are optional, which can be used in other place. + * For example: + * + [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * can map one or more dimensions to viusal (color, symbol size + * ...). + * + [series.symbolSize](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.symbolSize) + * can be set as a callback function, where symbol size can be calculated + * by values of a certain dimension. + * + Values in other dimensions can be shown by + * [tooltip.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.formatter) + * or + * [series.label.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.label.formatter) + * . + * + * Especially, when there is one and only one category axis (axis.type + * is `'category'`), data can be simply be represented by a one-dimension + * array, like: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * **Relationship between "value" and + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.type) + * ** + * + * + When a dimension corresponds to a value axis (axis.type + * is `'value'` or `'log'`): + * + * The value can be a `number` (like `12`) (can also be a number + * in a `string` format, like `'12'`). + * + * + When a dimension corresponds to a category axis (axis.type + * is `'category'`): + * + * The value should be the ordinal of the axis.data + * (based on `0`), the string value of the axis.data. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * There is an example of double category axes: + * [Github Punchcard](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-punchCard) + * . + * + * + When a dimension corresponds to a time axis (type is `'time'`), + * the value can be: + * + * + a timestamp, like `1484141700832`, which represents a UTC time. + * + a date string, in one of the formats below: + * + a subset of + * [ISO 8601](http://www.ecma-international.org/ecma-262/5.1/#se + * c-15.9.1.15) + * , only including (all of these are treated as local time unless + * timezone is specified, which is consistent with + * [moment](https://momentjs.com/) + * ): + * + only part of year/month/date/time are specified: `'2012-03'`, + * `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + * + separated by `"T"` or a space: `'2012-03-01T12:22:33.123'`, + * `'2012-03-01 12:22:33.123'`. + * + timezone specified: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, + * `'2012-03-01T12:22:33-05:00'`. + * + other date string format (all of these are treated as local + * time): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, + * `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`. + * + a JavaScript Date instance created by user: + * + Caution, when using a data string to create a Date instance, + * [browser differences and inconsistencies](http://dygraphs.com/date-formats.html) + * should be considered. + * + For example: In chrome, `new Date('2012-01-01')` is treated + * as a Jan 1st 2012 in UTC, while `new Date('2012-1-1')` and `new + * Date('2012/01/01')` are treated as Jan 1st 2012 in local timezone. + * In safari `new Date('2012-1-1')` is not supported. + * + So if you intent to perform `new Date(dateString)`, it is strongly + * recommended to use a time parse library (e.g., + * [moment](https://momentjs.com/) + * ), or use `echarts.number.parseDate`, or check + * [this](http://dygraphs.com/date-formats.html) + * . + * + * **Customize a data item:** + * + * When needing to customize a data item, it can be set as an object, + * where property `value` reprensent real value. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * **Empty value:** + * + * `'-'` or `null` or `undefined` or `NaN` can be used to describe + * that a data item is not exists (ps:_not exist_ does not means + * its value is `0`). + * + * For example, line chart can break when encounter an empty value, + * and scatter chart do not display graphic elements for empty values. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data + */ + data?: { + + /** + * Symbol of single data. + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data) + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.symbol + */ + symbol?: string; + + /** + * single data symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * + * @default + * 4 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of single data symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of single data symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.valueDim) + * can be used to assign the dimension. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.name + */ + name?: string; + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.type + */ + type?: string; + + /** + * Available when using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.type) + * it is used to assign maximum value and minimum value + * in dimensions, it could be `0` (xAxis, radiusAxis), `1` + * (yAxis, angleAxis), and use the first value axis dimension + * by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.type) + * is assigned. + * It is used to state the dimension used to calculate maximum + * value or minimum value. + * It may be the direct name of a dimension, like `x`, or + * `angle` for line charts, or `open`, or `close` for candlestick + * charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, whose + * format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint / + * markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.valueDim) + * can be used to assign the dimension. + * + * 4. + * You may also create a mark line in Cartesian coordinate at + * a specific position in X or Y axis by assigning `xAxis` or + * `yAxis`. See + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * for example. + * + * When multiple attributes exist, priority is as the above + * order. + * + * You may also set the type of mark line through `type`, stating + * whether it is for the maximum value or average value. + * Likewise, dimensions can be assigned through `valueIndex`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0 + */ + 0?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1 + */ + 1?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * 2. + * Specify the coordinate in data coordinate system (i.e., + * cartesian) using + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.coord) + * , which can be also set as `'min'`, `'max'`, `'average'` + * (e.g, + * `coord: [23, 'min']`, or `coord: ['average', 'max']`)。 + * + * 1. + * Locate the point on the min value or max value of `series.data` + * using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.type) + * , where + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markPoint.data.0.valueDim) + * can be used to specify the dimension on which the min, max + * or average are calculated. + * 2. + * If in cartesian, you can only specify `xAxis` or `yAxis` + * to define a mark area based on only X or Y axis, see sample + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0 + */ + 0?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1 + */ + 1?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in . + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in , which controls order + * of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.z + */ + z?: number; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.effectScatter.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-effectScatter.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/funnel.d.ts b/types/echarts/options/series/funnel.d.ts new file mode 100644 index 0000000000..a43b8f3960 --- /dev/null +++ b/types/echarts/options/series/funnel.d.ts @@ -0,0 +1,16488 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **Funnel chart** + * + * **sample:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel + */ + interface SeriesFunnel { + + /** + * @default + * "funnel" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.name + */ + name?: string; + + /** + * The specified minimum value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.min + */ + min?: number; + + /** + * The specified maximum value. + * + * + * @default + * 100 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.max + */ + max?: number; + + /** + * The mapped width from minimum data value + * [min](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.min) + * . + * + * It can be absolute pixel and also the percentage of + * [layout width](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.width) + * + * If you don't want the graph of minimum value to be a triangle, + * you can set up this property larger than 0. + * + * + * @default + * '0%' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.minSize + */ + minSize?: string; + + /** + * The mapped width from maximum data value + * [max](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.max) + * . + * + * It can be absolute pixel and also the percentage of + * [layout width](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.width) + * . + * + * + * @default + * '100%' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.maxSize + */ + maxSize?: string; + + /** + * Data sorting, which can be whether `'ascending'`, `'descending'`, + * `'none'`(in data order) or a function, which is the same as `Array.prototype.sort(function + * (a, b) { ... })`; + * + * + * @default + * "descending" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.sort + */ + sort?: string; + + /** + * Gap between each trapezoid. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.gap + */ + gap?: number; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * Horizontal align. + * Defaults to align center. Can be 'left', 'right', 'center'. + * + * + * @default + * "center" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnelAlign + */ + funnelAlign?: string; + + /** + * Text label of funnel chart, to explain some data information + * about graphic item like value, name and so on. + * `label` is placed under `itemStyle` in ECharts 2.x. + * In ECharts 3, to make the configuration structure flatter, `label`is + * taken to be at the same level with `itemStyle`, and has `emphasis` + * as `itemStyle` does. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label + */ + label?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Options:** + * + * + `'left'` + * + * Left side of funnel chart. + * The corresponding trapezoid would be related to through + * [visual guide line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine) + * . + * + * + `'right'` + * + * Right side of funnel chart. + * The corresponding trapezoid would be related to through + * [visual guide line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine) + * . + * + * + `'inside'` + * + * Inside the trapezoid of funnel chart. + * + * + `'inner'` equals to `'inside'`. + * + * + `'center'` equals to `'inside'`. + * + * + * @default + * "outside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * The visual guide line style of label. When + * [label position](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.label.position) + * is set as `'left'`or`'right'`, the visual guide line will show. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine + */ + labelLine?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.show + */ + show?: boolean; + + /** + * The length of the first part from visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.length + */ + length?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.labelLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.labelLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * The style of visual guide line in emphasis status. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis + */ + emphasis?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.show + */ + show?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.labelLine.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.labelLine.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + }; + }; + + /** + * Graphic style of , `emphasis` is the style when it is highlighted, + * like being hovered by mouse, or highlighted via legend connect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.itemStyle) + * + * Supports callback functions, in the form of: + * + * ``` + * (params: Object) => Color + * + * ``` + * + * Input parameters are `seriesIndex`, `dataIndex`, `data`, + * `value`, and etc. of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.color + */ + color?: string | Function; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label + */ + label?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.show + */ + show?: boolean; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine + */ + labelLine?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.show + */ + show?: boolean; + + /** + * The length of the first part from visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.length + */ + length?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.labelLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.labelLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * The style of visual guide line in emphasis status. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis + */ + emphasis?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.show + */ + show?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.labelLine.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.emphasis.labelLine.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.emphasis.labelLine.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + }; + }; + }; + + /** + * When + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, `seriesLayoutBy` specifies whether the column or the + * row of `dataset` is mapped to the series, namely, the series + * is "layout" on columns or rows. Optional values: + * + * + 'column': by default, the columns of `dataset` are mapped the + * series. In this case, each column represents a dimension. + * + 'row':the rows of `dataset` are mapped to the series. + * In this case, each row represents a dimension. + * + * Check this + * [example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=dataset-series-layout-by) + * . + * + * + * @default + * "column" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.seriesLayoutBy + */ + seriesLayoutBy?: string; + + /** + * If + * [series.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * is not specified, and + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * exists, the series will use `dataset`. + * `datasetIndex` specifies which dataset will be used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.datasetIndex + */ + datasetIndex?: number; + + /** + * Data array of series, which can be a single data value, like: + * + * ``` + * [12, 34, 56, 10, 23] + * + * ``` + * + * Or, if need extra dimensions for components like + * [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * to map to graphic attributes like color, it can also be in the + * form of array. For example: + * + * ``` + * [[12, 14], [34, 50], [56, 30], [10, 15], [23, 10]] + * + * ``` + * + * In this case, we can assgin the second value in each arrary item + * to + * [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * component. + * + * More likely, we need to assign name to each data item, in which + * case each item should be an object: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel) + * + * Each data item can be further custerized: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data + */ + data?: { + + /** + * the name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.name + */ + name?: string; + + /** + * data value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.value + */ + value?: number; + + /** + * Graphic style of , `emphasis` is the style when it is highlighted, + * like being hovered by mouse, or highlighted via legend connect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * The label configuration of a single data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label + */ + label?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Options:** + * + * + `'left'` + * + * Left side of funnel chart. + * The corresponding trapezoid would be related to through + * [visual guide line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine) + * . + * + * + `'right'` + * + * Right side of funnel chart. + * The corresponding trapezoid would be related to through + * [visual guide line](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.labelLine) + * . + * + * + `'inside'` + * + * Inside the trapezoid of funnel chart. + * + * + `'inner'` equals to `'inside'`. + * + * + `'center'` equals to `'inside'`. + * + * + * @default + * "outside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.position + */ + position?: string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine + */ + labelLine?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.show + */ + show?: boolean; + + /** + * The length of the first part from visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.length + */ + length?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.labelLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.labelLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * The style of visual guide line in emphasis status. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis + */ + emphasis?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.show + */ + show?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.labelLine.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.labelLine.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.labelLine.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label + */ + label?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.show + */ + show?: boolean; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine + */ + labelLine?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.show + */ + show?: boolean; + + /** + * The length of the first part from visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.length + */ + length?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.labelLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.labelLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * The style of visual guide line in emphasis status. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis + */ + emphasis?: { + + /** + * Whether to show visual guide line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.show + */ + show?: boolean; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.labelLine.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.emphasis.labelLine.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.emphasis.labelLine.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + }; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.name + */ + name?: string; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0 + */ + 0?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1 + */ + 1?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0 + */ + 0?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1 + */ + 1?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.funnel.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-funnel.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/gauge.d.ts b/types/echarts/options/series/gauge.d.ts new file mode 100644 index 0000000000..61093e5e5e --- /dev/null +++ b/types/echarts/options/series/gauge.d.ts @@ -0,0 +1,14272 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **Gauge chart** + * + * **Example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge + */ + interface SeriesGauge { + + /** + * @default + * "gauge" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.name + */ + name?: string; + + /** + * The radius of gauge chart. + * It can be a percentage value of the smaller of container half + * width and half height, also can be an absolute value. + * + * {{ use partial-legend-hover-link }} + * + * + * @default + * '75%' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.radius + */ + radius?: number | string; + + /** + * The start angle of gauge chart. The direct right side of + * [circle center](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.center) + * is `0` degree, the right above it is `90` degree, the direct + * left side of it is `180` degree. + * + * + * @default + * 225 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.startAngle + */ + startAngle?: number; + + /** + * The end angle of gauge chart. + * + * + * @default + * -45 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.endAngle + */ + endAngle?: number; + + /** + * Whether the scale in gauge chart increases clockwise. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.clockwise + */ + clockwise?: boolean; + + /** + * The minimum data value which map to + * [minAngle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.minAngle) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.min + */ + min?: number; + + /** + * The maximum data value which map to + * [maxAngle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.maxAngle) + * . + * + * + * @default + * 100 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.max + */ + max?: number; + + /** + * The number of split segments of gauge chart scale. + * + * + * @default + * 10 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitNumber + */ + splitNumber?: number; + + /** + * The related configuration about the axis line of gauge chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine + */ + axisLine?: { + + /** + * Whether to show the axis line of gauge chart. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.show + */ + show?: boolean; + + /** + * The style of the axis line of gauge chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle + */ + lineStyle?: { + + /** + * The axis line of gauge chart can be divided to several + * segments in different colors. + * The end position and color of each segment can be expressed + * by an array. + * + * Default value: + * + * ``` + * [[0.2, '#91c7ae'], [0.8, '#63869e'], [1, '#c23531']] + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.color + */ + color?: any[]; + + /** + * The width of axis line. + * + * + * @default + * 30 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.width + */ + width?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * The style of split line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine + */ + splitLine?: { + + /** + * Whether to show the split line. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.show + */ + show?: boolean; + + /** + * The length of split line, can be a pecentage value relative + * to radius. + * + * + * @default + * 30 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.length + */ + length?: number | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.splitLine.lineStyle) + * + * + * @default + * "#eee" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.splitLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.splitLine.lineStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * The tick line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick + */ + axisTick?: { + + /** + * Whether to show the scale. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.show + */ + show?: boolean; + + /** + * The split scale number between split line. + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.splitNumber + */ + splitNumber?: number; + + /** + * The length of tick line, can be a pecentage value relative + * to radius. + * + * + * @default + * 8 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.length + */ + length?: number | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisTick.lineStyle) + * + * + * @default + * "#eee" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisTick.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisTick.lineStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * Axis tick label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel + */ + axisLabel?: { + + /** + * Whether to show the label. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.show + */ + show?: boolean; + + /** + * The content formatter of scale label, which supports both + * string template and callback function. Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Gauge chart pointer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.pointer + */ + pointer?: { + + /** + * Whether to show the pointer. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.pointer.show + */ + show?: boolean; + + /** + * The length of pointer which could be absolute value and also + * the percentage relative to + * [radius](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.radius) + * . + * + * + * @default + * '80%' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.pointer.length + */ + length?: number | string; + + /** + * The width of pointer. + * + * + * @default + * 8 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.pointer.width + */ + width?: number; + }; + + /** + * The style of gauge chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle + */ + itemStyle?: { + + /** + * The color of pointer. Defaults to use + * [the color of section](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.color) + * where the numerical value belongs to. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * The title of gauge chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title + */ + title?: { + + /** + * Whether to show the title. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.show + */ + show?: boolean; + + /** + * The offset position relative to the center of gauge chart. + * The first item of array is the horizontal offset; the second + * item of array is the vertical offset. + * It could be absolute value and also the percentage relative + * to the radius of gauge chart. + * + * + * @default + * [0, '-40%'] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.offsetCenter + */ + offsetCenter?: any[]; + + /** + * text color. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 15 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.title.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.title.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * The detail about gauge chart which is used to show data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail + */ + detail?: { + + /** + * Whether to show the details. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.show + */ + show?: boolean; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.height + */ + height?: number | string; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.borderWidth + */ + borderWidth?: number; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.borderColor + */ + borderColor?: string; + + /** + * The offset position relative to the center of gauge chart. + * The first item of array is the horizontal offset; the second + * item of array is the vertical offset. + * It could be absolute value and also the percentage relative + * to the radius of gauge chart. + * + * + * @default + * [0, '40%'] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.offsetCenter + */ + offsetCenter?: any[]; + + /** + * text color. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 15 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.lineHeight + */ + lineHeight?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich + */ + rich?: { + /** + * The text color. Defaults to use + * [the color of section](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.axisLine.lineStyle.color) + * where the numerical value belongs to. + * + * + * @todo check that the option is valid and should be here + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.color + */ + // color?: string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.detail.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.detail.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.name + */ + name?: string; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0 + */ + 0?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1 + */ + 1?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0 + */ + 0?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1 + */ + 1?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.gauge.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-gauge.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/graph.d.ts b/types/echarts/options/series/graph.d.ts new file mode 100644 index 0000000000..bbfa4ad84f --- /dev/null +++ b/types/echarts/options/series/graph.d.ts @@ -0,0 +1,22092 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **relation graph** + * + * Graph is a diagram to represent + * [nodes](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.nodes) + * and the + * [links](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links) + * connecting nodes. + * + * **Tips:** In ECharts 2.x + * , the diagram of `force` type will not be available in ECharts 3 + * any more, which has been changed to use `graph` to show graph data. + * If you want to use force to lead the layout, you can set the + * [layout](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.layout) + * configuration as `'force'`. + * + * **Example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph + */ + interface SeriesGraph { + + /** + * @default + * "graph" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.name + */ + name?: string; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * The coordinate used in the series, whose options are: + * + * + `null` or `'none'` + * + * No coordinate. + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.yAxisIndex) + * to assign the corresponding axis component. + * + * + `'polar'` + * + * Use polar coordinates, with + * [polarIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.polarIndex) + * to assign the corresponding polar coordinate component. + * + * + `'geo'` + * + * Use geographic coordinate, with + * [geoIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.geoIndex) + * to assign the corresponding geographic coordinate components. + * + * + `'none'` + * + * Do not use coordinate system. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Index of + * [polar coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * to combine with, which is useful for multiple polar axes in one + * chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.polarIndex + */ + polarIndex?: number; + + /** + * Index of + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * to combine with, which is useful for multiple geographic axes + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.geoIndex + */ + geoIndex?: number; + + /** + * Index of + * [calendar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#calendar) + * to combine with, which is useful for multiple calendar coordinates + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.calendarIndex + */ + calendarIndex?: number; + + /** + * Whether to enable the highlight animation effect of mousr hover + * node. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.hoverAnimation + */ + hoverAnimation?: boolean; + + /** + * Graph layout. + * + * **Options:** + * + * + `'none'` No any layout, use + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.y) + * provided in + * [node](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data) + * as the position of node. + * + * + `'circular'` Adopt circular layout, see the example + * [Les Miserables](https://ecomfe.github.io/echarts-examples/public/editor.html?c=graph-circular-layout) + * . + * + * + `'force'` Adopt force-directed layout, see the example + * [Force](https://ecomfe.github.io/echarts-examples/public/editor.html?c=graph-force) + * , the detail about configrations of layout are in + * [graph.force](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force) + * + * + * @default + * "none" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.layout + */ + layout?: string; + + /** + * Configuration about circular layout. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.circular + */ + circular?: { + + /** + * Whether to rotate the label automatically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.circular.rotateLabel + */ + rotateLabel?: boolean; + }; + + /** + * Configuration items about force-directed layout. + * Force-directed layout simulates spring/charge model, which will + * add a repulsion between 2 nodes and add a attraction between + * 2 nodes of each edge. + * In each iteration nodes will move under the effect of repulsion + * and attraction. + * After several iterations, the nodes will be static in a balanced + * position. + * As a result, the energy local minimum of this whole model will + * be realized. + * + * The result of force-directed layout has a good symmetries and + * clustering, which is also aesthetically pleasing. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force + */ + force?: { + + /** + * The initial layout before force-directed layout, which will + * influence on the result of force-directed layout. + * + * It defaults not to do any layout and use + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.y) + * provided in + * [node](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data) + * as the position of node. + * If it doesn't exist, the position will be generated randomly. + * + * You can also use circular layout `'circular'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force.initLayout + */ + initLayout?: string; + + /** + * The repulsion factor between nodes. + * The repulsion will be stronger and the distance between 2 + * nodes becomes further as this value becomes larger. + * + * It can be an array to represent the range of repulsion. + * In this case larger value have larger repulsion and smaller + * value will have smaller repulsion. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force.repulsion + */ + repulsion?: any[] | number; + + /** + * The gravity factor enforcing nodes approach to the center. + * The nodes will be closer to the center as the value becomes + * larger. + * + * + * @default + * 0.1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force.gravity + */ + gravity?: number; + + /** + * The distance between 2 nodes on edge. + * This distance is also affected by + * [repulsion](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force.repulsion) + * . + * + * It can be an array to represent the range of edge length. + * In this case edge with larger value will be shorter, which + * means two nodes are closer. + * And edge with smaller value will be longer. + * + * + * @default + * 30 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force.edgeLength + */ + edgeLength?: any[] | number; + + /** + * Because the force-directed layout will be steady after several + * iterations, this parameter will be decide whether to show + * the iteration animation of layout. + * It is not recommended to be closed on browser when there + * are a lot of node data (>100) as the layout process will + * cause browser to hang. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.force.layoutAnimation + */ + layoutAnimation?: boolean; + }; + + /** + * Whether to enable mouse zooming and translating. + * `false` by default. + * If either zooming or translating is wanted, it can be set to + * `'scale'` or `'move'`. + * Otherwise, set it to be `true` to enable both. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.roam + */ + roam?: boolean | string; + + /** + * Related zooming ratio of nodes when mouse zooming in or out. + * When it is set as 0, the node will not zoom as the mouse zooms. + * + * + * @default + * 0.6 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.nodeScaleRatio + */ + nodeScaleRatio?: number; + + /** + * If node is draggable. + * Only available when using force-directed layout. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.draggable + */ + draggable?: boolean; + + /** + * Symbol of node of relation graph. + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which URL + * is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * Icons can be set to arbitrary vector path via `'path://'` in + * ECharts. + * As compared with raster image, vector paths prevent from jagging + * and blurring when scaled, and have a better control over changing + * colors. + * Size of vectoer icon will be adapted automatically. Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.symbol + */ + symbol?: string; + + /** + * node of relation graph symbol size. + * It can be set to single numbers like `10`, or use an array to + * represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with callback + * function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters of + * data item. + * + * + * @default + * 10 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of node of relation graph symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use tangent + * angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of node of relation graph symbol relative to original + * position. + * By default, symbol will be put in the center position of data. + * But if symbol is from user-defined vector path or image, you + * may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to default + * position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to focus/highlight the hover node and it's adjacencies. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.focusNodeAdjacency + */ + focusNodeAdjacency?: boolean; + + /** + * Symbol of two ends of edge line. + * + * For example: + * + * ``` + * edgeSymbol: ['circle', 'arrow'] + * + * ``` + * + * + * @default + * "[none', 'none']" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeSymbol + */ + edgeSymbol?: any[] | string; + + /** + * Size of symbol of two ends of edge line. + * Can be an array or a single number. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * + * @default + * 10 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeSymbolSize + */ + edgeSymbolSize?: any[] | number; + + /** + * The mouse style when mouse hovers on an element, the same as + * `cursor` property in `CSS`. + * + * + * @default + * "pointer" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.cursor + */ + cursor?: string; + + /** + * Graphic style of , `emphasis` is the style when it is highlighted, + * like being hovered by mouse, or highlighted via legend connect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.itemStyle) + * + * Supports callback functions, in the form of: + * + * ``` + * (params: Object) => Color + * + * ``` + * + * Input parameters are `seriesIndex`, `dataIndex`, `data`, + * `value`, and etc. of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.color + */ + color?: string | Function; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * The style of edge line. + * [lineStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.color) + * can be `'source'` or `'target'`, which will use the color of + * source node or target node. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.lineStyle) + * + * + * @default + * "#aaa" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @default + * 0.5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.lineStyle.curveness + */ + curveness?: number; + }; + + /** + * Text label of , to explain some data information about graphic + * item like value, name and so on. + * `label` is placed under `itemStyle` in ECharts 2.x. + * In ECharts 3, to make the configuration structure flatter, `label`is + * taken to be at the same level with `itemStyle`, and has `emphasis` + * as `itemStyle` does. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to represent + * position of label relative to top-left corner of bounding + * box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally and + * move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel + */ + edgeLabel?: { + + /** + * If show label on edge. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.show + */ + show?: boolean; + + /** + * Label position, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "middle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.position + */ + position?: string; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel + */ + edgeLabel?: { + + /** + * If show label on edge. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.show + */ + show?: boolean; + + /** + * Label position, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "middle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.emphasis.edgeLabel.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * The categories of node, which is optional. + * If there is a classification of nodes, the category of each node + * can be assigned through + * [data\[i\].category](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.category) + * + * And the style of category will also be applied to the style of + * nodes. `categories` can also be used in + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories + */ + categories?: { + + /** + * Name of category, which is used to correspond with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * and the content of + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.name + */ + name?: string; + + /** + * Symbol of node of this category. + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.symbol + */ + symbol?: string; + + /** + * node of this category symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of node of this category symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of node of this category symbol relative to original + * position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.symbolOffset + */ + symbolOffset?: any[]; + + /** + * The style of node in this category. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * The label style of node in this category. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.categories.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Nodes list of graph. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data + */ + data?: { + + /** + * Name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.name + */ + name?: string; + + /** + * `x` value of node position. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.x + */ + x?: number; + + /** + * `y` value of node position. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.y + */ + y?: number; + + /** + * If node are fixed when doing force directed layout. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.fixed + */ + fixed?: boolean; + + /** + * Value of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.value + */ + value?: any[] | number; + + /** + * Index of category which the data item belongs to. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.category + */ + category?: number; + + /** + * Symbol of node of this category. + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.symbol + */ + symbol?: string; + + /** + * node of this category symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of node of this category symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of node of this category symbol relative to original + * position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * The style of this node. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle + */ + itemStyle?: { + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * The label style of this node. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * Alias of + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.nodes + */ + nodes?: any[]; + + /** + * Relational data between nodes. Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links + */ + links?: { + + /** + * [name of source node](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.name) + * on edge + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.source + */ + source?: string; + + /** + * [name of target node](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.data.name) + * on edge + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.target + */ + target?: string; + + /** + * value of edge, can be mapped to edge length in force graph. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.value + */ + value?: number; + + /** + * Line style of edges. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.opacity + */ + opacity?: number; + + /** + * The curveness of edge, supporting values from 0 to 1. + * The curveness will be larger as the value becomes lager. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.lineStyle.curveness + */ + curveness?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label + */ + label?: { + + /** + * If show label on edge. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.show + */ + show?: boolean; + + /** + * Label position, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "middle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label + */ + label?: { + + /** + * If show label on edge. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.show + */ + show?: boolean; + + /** + * Label position, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "middle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.links.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * Symbol of edge ends. + * Can be an array with two item to specify two ends, or a string + * specifies both ends. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size of edge ends. + * Can be an array with two item to specify two ends, or a string + * specifies both ends. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links.symbolSize + */ + symbolSize?: any[] | string; + }; + + /** + * Alias of + * [links](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.links) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.edges + */ + edges?: any[]; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.valueDim) + * can be used to assign the dimension. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.name + */ + name?: string; + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.type + */ + type?: string; + + /** + * Available when using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.type) + * it is used to assign maximum value and minimum value + * in dimensions, it could be `0` (xAxis, radiusAxis), `1` + * (yAxis, angleAxis), and use the first value axis dimension + * by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.type) + * is assigned. + * It is used to state the dimension used to calculate maximum + * value or minimum value. + * It may be the direct name of a dimension, like `x`, or + * `angle` for line charts, or `open`, or `close` for candlestick + * charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, whose + * format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint / + * markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.valueDim) + * can be used to assign the dimension. + * + * 4. + * You may also create a mark line in Cartesian coordinate at + * a specific position in X or Y axis by assigning `xAxis` or + * `yAxis`. See + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * for example. + * + * When multiple attributes exist, priority is as the above + * order. + * + * You may also set the type of mark line through `type`, stating + * whether it is for the maximum value or average value. + * Likewise, dimensions can be assigned through `valueIndex`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0 + */ + 0?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1 + */ + 1?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * 2. + * Specify the coordinate in data coordinate system (i.e., + * cartesian) using + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.coord) + * , which can be also set as `'min'`, `'max'`, `'average'` + * (e.g, + * `coord: [23, 'min']`, or `coord: ['average', 'max']`)。 + * + * 1. + * Locate the point on the min value or max value of `series.data` + * using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.type) + * , where + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markPoint.data.0.valueDim) + * can be used to specify the dimension on which the min, max + * or average are calculated. + * 2. + * If in cartesian, you can only specify `xAxis` or `yAxis` + * to define a mark area based on only X or Y axis, see sample + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0 + */ + 0?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1 + */ + 1?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in . + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in , which controls order + * of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.z + */ + z?: number; + + /** + * Distance between component and the left side of the container. + * + * `left` value can be instant pixel value like `20`; it can also + * be percentage value relative to container width like `'20%'`; + * and it can also be `'left'`, `'center'`, or `'right'`. + * + * If the `left` value is set to be `'left'`, `'center'`, or `'right'`, + * then the component will be aligned automatically based on position. + * + * + * @default + * "center" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.left + */ + left?: number | string; + + /** + * Distance between component and the top side of the container. + * + * `top` value can be instant pixel value like `20`; it can also + * be percentage value relative to container width like `'20%'`; + * and it can also be `'top'`, `'middle'`, or `'bottom'`. + * + * If the `left` value is set to be `'top'`, `'middle'`, or `'bottom'`, + * then the component will be aligned automatically based on position. + * + * + * @default + * "middle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.top + */ + top?: number | string; + + /** + * Distance between component and the right side of the container. + * + * `right` value can be instant pixel value like `20`; it can also + * be percentage value relative to container width like `'20%'`. + * + * Adaptive by default. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.right + */ + right?: number | string; + + /** + * Distance between component and the bottom side of the container. + * + * `bottom` value can be instant pixel value like `20`; it can also + * be percentage value relative to container width like `'20%'`. + * + * Adaptive by default. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.bottom + */ + bottom?: number | string; + + /** + * Width of component. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.width + */ + width?: number | string; + + /** + * Height of component. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.height + */ + height?: number | string; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.silent + */ + silent?: boolean; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.graph.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-graph.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/heatmap.d.ts b/types/echarts/options/series/heatmap.d.ts new file mode 100644 index 0000000000..1976c77ad3 --- /dev/null +++ b/types/echarts/options/series/heatmap.d.ts @@ -0,0 +1,15348 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **heat map** + * + * Heat map mainly use colors to represent values, which must be used + * along with + * [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * component. + * + * It can be used in either + * [rectangular coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * or + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * + * But the behaviour on them are quite different. + * Rectangular coordinate must have two catagories to use it. + * + * Here are the examples using it in rectangular coordinate and geographic + * coordinate: + * + * **rectangular coordinate:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap) + * + * **geographic coordinate:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap + */ + interface SeriesHeatmap { + + /** + * @default + * "heatmap" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.name + */ + name?: string; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.yAxisIndex) + * to assign the corresponding axis component. + * + * + `'geo'` + * + * Use geographic coordinate, with + * [geoIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.geoIndex) + * to assign the corresponding geographic coordinate components. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Index of + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * to combine with, which is useful for multiple geographic axes + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.geoIndex + */ + geoIndex?: number; + + /** + * Index of + * [calendar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#calendar) + * to combine with, which is useful for multiple calendar coordinates + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.calendarIndex + */ + calendarIndex?: number; + + /** + * Blur size of each data point. It is valid with + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * of 'geo' value. + * + * + * @default + * 20 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.blurSize + */ + blurSize?: number; + + /** + * Minimum opacity. It is valid with + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * of 'geo' value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.minOpacity + */ + minOpacity?: number; + + /** + * Maximum opacity. It is valid with + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * of 'geo' value. + * + * + * @default + * 1 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.maxOpacity + */ + maxOpacity?: number; + + /** + * Work for + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * : 'cartesian2d'. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to represent + * position of label relative to top-left corner of bounding + * box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally and + * move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Work for + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * : 'cartesian2d'. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Data array of series, which can be in the following forms: + * + * Notice, if no `data` specified in series, and there is + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * in option, series will use the first + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * as its datasource. If `data` has been specified, + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * will not used. + * + * `series.datasetIndex` can be used to specify other + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * . + * + * Basically, data is represented by a two-dimension array, like + * the example below, where each colum is named as a "dimension". + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap) + * + * + In + * [cartesian (grid)](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , "dimX" and "dimY" correspond to + * [xAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * and + * [yAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * repectively. + * + In + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * "dimX" and "dimY" correspond to + * [radiusAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#radiusAxis) + * 和 + * [angleAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#anbleAxis) + * repectively. + * + Other dimensions are optional, which can be used in other place. + * For example: + * + [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * can map one or more dimensions to viusal (color, symbol size + * ...). + * + [series.symbolSize](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.symbolSize) + * can be set as a callback function, where symbol size can be calculated + * by values of a certain dimension. + * + Values in other dimensions can be shown by + * [tooltip.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.formatter) + * or + * [series.label.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.label.formatter) + * . + * + * Especially, when there is one and only one category axis (axis.type + * is `'category'`), data can be simply be represented by a one-dimension + * array, like: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap) + * + * **Relationship between "value" and + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.type) + * ** + * + * + When a dimension corresponds to a value axis (axis.type + * is `'value'` or `'log'`): + * + * The value can be a `number` (like `12`) (can also be a number + * in a `string` format, like `'12'`). + * + * + When a dimension corresponds to a category axis (axis.type + * is `'category'`): + * + * The value should be the ordinal of the axis.data + * (based on `0`), the string value of the axis.data. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap) + * + * There is an example of double category axes: + * [Github Punchcard](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-punchCard) + * . + * + * + When a dimension corresponds to a time axis (type is `'time'`), + * the value can be: + * + * + a timestamp, like `1484141700832`, which represents a UTC time. + * + a date string, in one of the formats below: + * + a subset of + * [ISO 8601](http://www.ecma-international.org/ecma-262/5.1/#se + * c-15.9.1.15) + * , only including (all of these are treated as local time unless + * timezone is specified, which is consistent with + * [moment](https://momentjs.com/) + * ): + * + only part of year/month/date/time are specified: `'2012-03'`, + * `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + * + separated by `"T"` or a space: `'2012-03-01T12:22:33.123'`, + * `'2012-03-01 12:22:33.123'`. + * + timezone specified: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, + * `'2012-03-01T12:22:33-05:00'`. + * + other date string format (all of these are treated as local + * time): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, + * `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`. + * + a JavaScript Date instance created by user: + * + Caution, when using a data string to create a Date instance, + * [browser differences and inconsistencies](http://dygraphs.com/date-formats.html) + * should be considered. + * + For example: In chrome, `new Date('2012-01-01')` is treated + * as a Jan 1st 2012 in UTC, while `new Date('2012-1-1')` and `new + * Date('2012/01/01')` are treated as Jan 1st 2012 in local timezone. + * In safari `new Date('2012-1-1')` is not supported. + * + So if you intent to perform `new Date(dateString)`, it is strongly + * recommended to use a time parse library (e.g., + * [moment](https://momentjs.com/) + * ), or use `echarts.number.parseDate`, or check + * [this](http://dygraphs.com/date-formats.html) + * . + * + * **Customize a data item:** + * + * When needing to customize a data item, it can be set as an object, + * where property `value` reprensent real value. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap) + * + * **Empty value:** + * + * `'-'` or `null` or `undefined` or `NaN` can be used to describe + * that a data item is not exists (ps:_not exist_ does not means + * its value is `0`). + * + * For example, line chart can break when encounter an empty value, + * and scatter chart do not display graphic elements for empty values. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data + */ + data?: { + + /** + * Name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.name + */ + name?: string; + + /** + * Value of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.value + */ + value?: any[]; + + /** + * It is valid with + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * of 'cartesian2d' value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Style of a single data point. It is valid with + * [coordinateSystem](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.coordinateSystem) + * of 'cartesian2d' value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.name + */ + name?: string; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0 + */ + 0?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1 + */ + 1?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0 + */ + 0?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1 + */ + 1?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in heatmap. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in heatmap, which controls + * order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.z + */ + z?: number; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.silent + */ + silent?: boolean; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.heatmap.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-heatmap.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/line.d.ts b/types/echarts/options/series/line.d.ts new file mode 100644 index 0000000000..60fcd01e65 --- /dev/null +++ b/types/echarts/options/series/line.d.ts @@ -0,0 +1,17082 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **broken line chart** + * + * Broken line chart relates all the data points + * [symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbol) + * by broken lines, which is used to show the trend of data changing. + * It could be used in both + * [rectangular coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * and + * [polar coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Tip:** When + * [areaStyle](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle) + * is set, area chart will be drew. + * + * **Tip:** With + * [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap-piecewise) + * component, Broken line / area chart can have different colors on + * different sections, as below: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line + */ + interface SeriesLine { + + /** + * @default + * "line" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.name + */ + name?: string; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.yAxisIndex) + * to assign the corresponding axis component. + * + * + `'polar'` + * + * Use polar coordinates, with + * [polarIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-bar.polarIndex) + * to assign the corresponding polar coordinate component. + * + * + * @default + * "cartesian2d" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Index of + * [polar coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * to combine with, which is useful for multiple polar axes in one + * chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.polarIndex + */ + polarIndex?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which URL + * is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * Icons can be set to arbitrary vector path via `'path://'` in + * ECharts. + * As compared with raster image, vector paths prevent from jagging + * and blurring when scaled, and have a better control over changing + * colors. + * Size of vectoer icon will be adapted automatically. Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array to + * represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with callback + * function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data) + * , and the second parameter `params` is the rest parameters of + * data item. + * + * + * @default + * 4 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use tangent + * angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of data. + * But if symbol is from user-defined vector path or image, you + * may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to default + * position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to show symbol. + * It would be shown during tooltip hover. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.showSymbol + */ + showSymbol?: boolean; + + /** + * Only work when main axis is `'category'` axis (`axis.type` + * is `'category'`). Optional values: + * + * + `'auto'`: Default value. + * Show all symbols if there is enough space. + * Otherwise follow the interval strategy with with + * [axisLabel.interval](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisLabel.interval) + * . + * + `true`: Show all symbols. + * + `false`: Follow the interval strategy with + * [axisLabel.interval](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisLabel.interval) + * . + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.showAllSymbol + */ + showAllSymbol?: boolean; + + /** + * Whether to enable the animation effect when mouse is on the symbol. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.hoverAnimation + */ + hoverAnimation?: boolean; + + /** + * Whether to enable highlighting chart when + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * is being hovered. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.legendHoverLink + */ + legendHoverLink?: boolean; + + /** + * If stack the value. + * On the same category axis, the series with the same `stack` name + * would be put on top of each other. + * + * The effect of the below example could be seen through stack switching + * of + * [toolbox](https://ecomfe.github.io/echarts-doc/public/en/option.html#toolbox) + * on the top right corner: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.stack + */ + stack?: string; + + /** + * The mouse style when mouse hovers on an element, the same as + * `cursor` property in `CSS`. + * + * + * @default + * "pointer" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.cursor + */ + cursor?: string; + + /** + * Whether to connect the line across null points. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.connectNulls + */ + connectNulls?: boolean; + + /** + * Whether to clip the overflowing part, which defaults to clip. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.clipOverflow + */ + clipOverflow?: boolean; + + /** + * Whether to show as a step line. + * It can be `true`, `false`. + * Or `'start'`, `'middle'`, `'end'`. + * Which will configure the turn point of step line. + * + * See the example using different `step` options: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.step + */ + step?: boolean | string; + + /** + * Text label of , to explain some data information about graphic + * item like value, name and so on. + * `label` is placed under `itemStyle` in ECharts 2.x. + * In ECharts 3, to make the configuration structure flatter, `label`is + * taken to be at the same level with `itemStyle`, and has `emphasis` + * as `itemStyle` does. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to represent + * position of label relative to top-left corner of bounding + * box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "top" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally and + * move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual color, + * such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * The style of the symbol point of broken line. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle + */ + itemStyle?: { + /** + * Some properties like "normal" or "emphasis" are not documented. + * Please, write description for them + */ + [unknownProperty: string]: any; + + /** + * color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.itemStyle) + * + * Supports callback functions, in the form of: + * + * ``` + * (params: Object) => Color + * + * ``` + * + * Input parameters are `seriesIndex`, `dataIndex`, `data`, + * `value`, and etc. of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.color + */ + color?: string | Function; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * Line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * The style of area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle + */ + areaStyle?: { + + /** + * Fill color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.areaStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.color + */ + color?: string; + + /** + * Origin position of area. + * + * By default, the area between axis line and data will be the + * area to be filled. + * This config enables you to fill data to the max or min of + * the axis data. + * + * Valid values include: `'auto'` (default), `'start'`, `'end'`. + * + * + `'auto'` to fill between axis line to data; + * + `'start'` to fill between min axis value (when not `inverse`) + * to data; + * + `'end'` to fill between max axis value (when not `inverse`) + * to data; + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.origin + */ + origin?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.areaStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.areaStyle.opacity + */ + opacity?: number; + }; + + /** + * 图形的高亮样式。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + }; + + /** + * Whether to show as smooth curve. + * + * If is typed in `boolean`, then it means whether to enable smoothing. + * If is typed in `number`, valued from 0 to 1, then it means smoothness. + * A smaller value makes it less smooth. + * + * Please refer to + * [smoothMonotone](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.smoothMonotone) + * to change smoothing algorithm. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.smooth + */ + smooth?: boolean | number; + + /** + * Whether the broken line keep the monotonicity when it is smoothed. + * It can be set as `'x'`, `'y'` to keep the monotonicity on x axis + * or y axis. + * Or it can be set to be `'none'` to use non-monotone smoothing + * algorithm. + * + * From ECharts 4.0.3, + * we improved our default smoothing algorithm. + * The old algorithm can be used by setting `smoothMonotone` to + * be `'none'`. + * Here's the difference between old and new algorithm. + * In the following chart, old algorithm is in green color, and + * new algorithm is in red color. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * The old algorithm has many problems: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * Old algorithm uses the previous and next point to form control + * points' direction, while they are always horizontal (when the + * first dimension of data is monotone) or vertical (when the second + * dimension of data is monotone) in new algorithm. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * But new algorithm doesn't work with non-monotone data. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * So we suggest that default value of `smoothMonotone` be used + * in most situations. + * If data on Y axis is monotone, it should be set to be `'y'`. + * If data is non-monotone, it should be set to be `'none'` to use + * the old algorithm. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.smoothMonotone + */ + smoothMonotone?: string; + + /** + * The dowmsampling strategy used when the data size is much larger + * than pixel size. + * It will improve the performance when turned on. + * Defaults to be turned off, indicating that all the data points + * will be drawn. + * + * Options: + * + * + `'average'` Use average value of filter points + * + `'max'` Use maximum value of filter points + * + `'min'` Use minimum value of filter points + * + `'sum'` Use sum of filter points + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.sampling + */ + sampling?: string; + + /** + * `dimensions` can be used to define dimension info for `series.data` + * or `dataset.source`. + * + * Notice: if + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, we can provide dimension names in the first column/row + * of + * [dataset.source](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset.source) + * , and not need to specify `dimensions` here. + * But if `dimensions` is specified here, echarts will not retrieve + * dimension names from the first row/column of `dataset.source` + * any more. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * Each data item of `dimensions` can be: + * + * + `string`, for example, `'someName'`, which equals to `{name: + * 'someName'}`. + * + `Object`, where the attributes can be: + * + name: `string`. + * + type: `string`, supports: + * + `number` + * + `float`, that is, + * [Float64Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) + * + * + `int`, that is, + * [Int32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) + * + * + `ordinal`, discrete value, which represents string generally. + * + `time`, time value, see + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * to check the format of time value. + * + displayName: `string`, generally used in tooltip for dimension + * display. If not specified, use `name` by default. + * + * When `dimensions` is specified, the default `tooltip` will be + * displayed vertically, which is better to show diemsion names. + * Otherwise, `tooltip` will displayed only value horizontally. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.dimensions + */ + dimensions?: any[]; + + /** + * Define what is encoded to for each dimension of `data`. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * Attributes of encode are different according to the type of coordinate + * systtems. For + * [cartesian2d](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , `x` and `y` can be defined. For + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * , `radius` and `angle` can be defined. For + * [geo](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * , `lng` and `lat` can be defined. + * Attribute `tooltip` and `itemName` (data item name in tooltip) + * are always able to be defined. + * + * When + * [dimensions](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.dimensions) + * is used to defined name for a certain dimension, `encode` can + * refer the name directly. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * Specially, in \[custom series(~series-custom), some property + * in `encode`, corresponding to axis, can be set as null to make + * the series not controlled by the axis, that is, the series data + * will not be count in the extent of the axis, and the + * [dataZoom](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataZoom) + * on the axis will not filter the series. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.encode + */ + encode?: object; + + /** + * When + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * is used, `seriesLayoutBy` specifies whether the column or the + * row of `dataset` is mapped to the series, namely, the series + * is "layout" on columns or rows. Optional values: + * + * + 'column': by default, the columns of `dataset` are mapped the + * series. In this case, each column represents a dimension. + * + 'row':the rows of `dataset` are mapped to the series. + * In this case, each row represents a dimension. + * + * Check this + * [example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=dataset-series-layout-by) + * . + * + * + * @default + * "column" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.seriesLayoutBy + */ + seriesLayoutBy?: string; + + /** + * If + * [series.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.data) + * is not specified, and + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * exists, the series will use `dataset`. + * `datasetIndex` specifies which dataset will be used. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.datasetIndex + */ + datasetIndex?: number; + + /** + * Data array of series, which can be in the following forms: + * + * Notice, if no `data` specified in series, and there is + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * in option, series will use the first + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * as its datasource. If `data` has been specified, + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * will not used. + * + * `series.datasetIndex` can be used to specify other + * [dataset](https://ecomfe.github.io/echarts-doc/public/en/option.html#dataset) + * . + * + * Basically, data is represented by a two-dimension array, like + * the example below, where each colum is named as a "dimension". + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + In + * [cartesian (grid)](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , "dimX" and "dimY" correspond to + * [xAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * and + * [yAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * repectively. + * + In + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * "dimX" and "dimY" correspond to + * [radiusAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#radiusAxis) + * 和 + * [angleAxis](https://ecomfe.github.io/echarts-doc/public/en/option.html#anbleAxis) + * repectively. + * + Other dimensions are optional, which can be used in other place. + * For example: + * + [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * can map one or more dimensions to viusal (color, symbol size + * ...). + * + [series.symbolSize](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.symbolSize) + * can be set as a callback function, where symbol size can be calculated + * by values of a certain dimension. + * + Values in other dimensions can be shown by + * [tooltip.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.formatter) + * or + * [series.label.formatter](https://ecomfe.github.io/echarts-doc/public/en/option.html#series.label.formatter) + * . + * + * Especially, when there is one and only one category axis (axis.type + * is `'category'`), data can be simply be represented by a one-dimension + * array, like: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * **Relationship between "value" and + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.type) + * ** + * + * + When a dimension corresponds to a value axis (axis.type + * is `'value'` or `'log'`): + * + * The value can be a `number` (like `12`) (can also be a number + * in a `string` format, like `'12'`). + * + * + When a dimension corresponds to a category axis (axis.type + * is `'category'`): + * + * The value should be the ordinal of the axis.data + * (based on `0`), the string value of the axis.data. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * There is an example of double category axes: + * [Github Punchcard](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-punchCard) + * . + * + * + When a dimension corresponds to a time axis (type is `'time'`), + * the value can be: + * + * + a timestamp, like `1484141700832`, which represents a UTC time. + * + a date string, in one of the formats below: + * + a subset of + * [ISO 8601](http://www.ecma-international.org/ecma-262/5.1/#se + * c-15.9.1.15) + * , only including (all of these are treated as local time unless + * timezone is specified, which is consistent with + * [moment](https://momentjs.com/) + * ): + * + only part of year/month/date/time are specified: `'2012-03'`, + * `'2012-03-01'`, `'2012-03-01 05'`, `'2012-03-01 05:06'`. + * + separated by `"T"` or a space: `'2012-03-01T12:22:33.123'`, + * `'2012-03-01 12:22:33.123'`. + * + timezone specified: `'2012-03-01T12:22:33Z'`, `'2012-03-01T12:22:33+8000'`, + * `'2012-03-01T12:22:33-05:00'`. + * + other date string format (all of these are treated as local + * time): `'2012'`, `'2012-3-1'`, `'2012/3/1'`, `'2012/03/01'`, + * `'2009/6/12 2:00'`, `'2009/6/12 2:05:08'`, `'2009/6/12 2:05:08.123'`. + * + a JavaScript Date instance created by user: + * + Caution, when using a data string to create a Date instance, + * [browser differences and inconsistencies](http://dygraphs.com/date-formats.html) + * should be considered. + * + For example: In chrome, `new Date('2012-01-01')` is treated + * as a Jan 1st 2012 in UTC, while `new Date('2012-1-1')` and `new + * Date('2012/01/01')` are treated as Jan 1st 2012 in local timezone. + * In safari `new Date('2012-1-1')` is not supported. + * + So if you intent to perform `new Date(dateString)`, it is strongly + * recommended to use a time parse library (e.g., + * [moment](https://momentjs.com/) + * ), or use `echarts.number.parseDate`, or check + * [this](http://dygraphs.com/date-formats.html) + * . + * + * **Customize a data item:** + * + * When needing to customize a data item, it can be set as an object, + * where property `value` reprensent real value. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * **Empty value:** + * + * `'-'` or `null` or `undefined` or `NaN` can be used to describe + * that a data item is not exists (ps:_not exist_ does not means + * its value is `0`). + * + * For example, line chart can break when encounter an empty value, + * and scatter chart do not display graphic elements for empty values. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data + */ + data?: { + + /** + * The name of data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.name + */ + name?: string; + + /** + * The value of a single data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.value + */ + value?: number; + + /** + * Symbol of single data. + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data) + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.symbol + */ + symbol?: string; + + /** + * single data symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * + * @default + * 4 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of single data symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of single data symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * The style of the text of single data point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "top" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * The style of the symbol of single data point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle + */ + itemStyle?: { + + /** + * Bar color.. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.color + */ + color?: string; + + /** + * The bodrder color of bar. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.barBorderColor + */ + barBorderColor?: string; + + /** + * The bodrder width of bar. defaults to have no border. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.barBorderWidth + */ + barBorderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle + */ + itemStyle?: { + + /** + * Bar color.. + * + * + * @default + * "auto" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.color + */ + color?: string; + + /** + * The bodrder color of bar. + * + * + * @default + * '#000' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.barBorderColor + */ + barBorderColor?: string; + + /** + * The bodrder width of bar. + * defaults to have no border. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.barBorderWidth + */ + barBorderWidth?: number; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.itemStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * tooltip settings in this series data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip + */ + tooltip?: { + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative + * percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, + * and `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: + * [width, height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, + * which can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse + * is in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.position + */ + position?: any[] | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which + * supports string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` + * and `{e}`, which stands for series name, data name and + * data value and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple + * series. + * In this time, series index can be refered as `{a0}`, + * `{a1}`, or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for + * different series types: + * + * + Line (area) charts, bar (column) charts, K charts: + * `{a}` for series name, `{b}` for category name, `{c}` + * for data value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` + * for data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for + * series name, `{b}` for data item name, `{c}` for data + * value, `{d}` for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as + * above. Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * **Note:** Using array to present all the parameters in + * ECharts 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, + * `ticket` and `htm` as introduced above can be used to + * update tooltip with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.formatter + */ + formatter?: Function | string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.borderColor + */ + borderColor?: string; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.padding + */ + padding?: number; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.data.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * > **Notice:**series.data.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.data.tooltip.extraCssText + */ + extraCssText?: string; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.valueDim) + * can be used to assign the dimension. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.name + */ + name?: string; + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.type + */ + type?: string; + + /** + * Available when using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.type) + * it is used to assign maximum value and minimum value + * in dimensions, it could be `0` (xAxis, radiusAxis), `1` + * (yAxis, angleAxis), and use the first value axis dimension + * by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.type) + * is assigned. + * It is used to state the dimension used to calculate maximum + * value or minimum value. + * It may be the direct name of a dimension, like `x`, or + * `angle` for line charts, or `open`, or `close` for candlestick + * charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, whose + * format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint / + * markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * 2. Assign coordinate position with + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.coord) + * attribute, in which `'min'`, `'max'`, `'average'` are supported + * for each dimension. + * + * 3. Use + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.type) + * attribute to mark the maximum and minimum values in the series, + * in which + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.valueDim) + * can be used to assign the dimension. + * + * 4. + * You may also create a mark line in Cartesian coordinate at + * a specific position in X or Y axis by assigning `xAxis` or + * `yAxis`. See + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * for example. + * + * When multiple attributes exist, priority is as the above + * order. + * + * You may also set the type of mark line through `type`, stating + * whether it is for the maximum value or average value. + * Likewise, dimensions can be assigned through `valueIndex`. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0 + */ + 0?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1 + */ + 1?: { + + /** + * Special label types, are used to label maximum value, + * minimum value and so on. + * + * **Options are:** + * + * + `'min'` maximum value. + * + `'max'` minimum value. + * + `'average'` average value. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.type + */ + type?: string; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be `0` (for xAxis, or radiusAxis), or `1` + * (for yAxis, or angleAxis). + * Dimension of the first numeric axis is used by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Works only when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markLine.data.type) + * is assigned. + * It is used to state the dimension used to calculate + * maximum value or minimum value. + * It may be the direct name of a dimension, like `x`, + * or `angle` for line charts, or `open`, or `close` + * for candlestick charts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.valueDim + */ + valueDim?: string; + + /** + * Coordinates of the starting point or ending point, + * whose format depends on the coordinate of the series. + * It can be `x`, and `y` for + * [rectangular coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, and `angle` for + * [polar coordinates](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * **Notice:** For axis with + * [axis.type](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAixs.type) + * `'category'`: + * + * + If coord value is `number`, it represents index + * of + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * . + * + If coord value is `string`, it represents concrete + * value in + * [axis.data](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.data) + * + * + * Please notice that in this case `xAxis.data` + * must not be written as \[number, number, + * + * + * + * \], but can only be written \[string, string, + * + * + * + * \]. + * Otherwise it is not able to be located by markPoint + * / markLine. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.coord + */ + coord?: any[]; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * 2. + * Specify the coordinate in data coordinate system (i.e., + * cartesian) using + * [coord](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.coord) + * , which can be also set as `'min'`, `'max'`, `'average'` + * (e.g, + * `coord: [23, 'min']`, or `coord: ['average', 'max']`)。 + * + * 1. + * Locate the point on the min value or max value of `series.data` + * using + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.type) + * , where + * [valueIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.valueIndex) + * or + * [valueDim](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markPoint.data.0.valueDim) + * can be used to specify the dimension on which the min, max + * or average are calculated. + * 2. + * If in cartesian, you can only specify `xAxis` or `yAxis` + * to define a mark area based on only X or Y axis, see sample + * [scatter-weight](https://ecomfe.github.io/echarts-examples/public/editor.html?c=scatter-weight) + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0 + */ + 0?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1 + */ + 1?: { + + /** + * Specify this item is on min or max or average value. + * + * **Options:** + * + * + `'min'` max value。 + * + `'max'` min value。 + * + `'average'` average value。 + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.type + */ + type?: string; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be `0` (means xAxis, radiusAxis) or + * `1` (means yAxis, angleAxis), using the dimension + * of the first axis by default. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.valueIndex + */ + valueIndex?: number; + + /** + * Specify the dimension on which min, max, average + * are calculated, available when + * [type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.markArea.data.type) + * used. + * The value can be the name of the dimension (for example, + * the value can be `x`, `angle` in line chart, and + * `open`, `close` in candlestick). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.valueDim + */ + valueDim?: string; + + /** + * The format is \[start coordinate, end coordinate\], + * where the coordinate system can be `x`, `y` on + * [cartesian](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * , or `radius`, `angle` on + * [polar](https://ecomfe.github.io/echarts-doc/public/en/option.html#polar) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.coord + */ + coord?: any[]; + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in broken line graph. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in broken line graph, which + * controls order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.z + */ + z?: number; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.silent + */ + silent?: boolean; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "linear" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + + /** + * tooltip settings in this series. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip + */ + tooltip?: { + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The position of the tooltip's floating layer, which would + * follow the position of mouse by default. + * + * Options: + * + * + `Array` + * + * Display the position of tooltip's floating layer through + * array, which supports absolute position and relative percentage. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * + `Function` + * + * Callback function in the following form: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * **Parameters:** + * point: Mouse position. + * param: The same as formatter. + * dom: The DOM object of tooltip. + * rect: It is valid only when mouse is on graphic elements, + * which stands for a bounding box with `x`, `y`, `width`, and + * `height`. + * size: The size of dom echarts container. + * For example: `{contentSize: [width, height], viewSize: [width, + * height]}`. + * + * **Return:** + * Return value is an array standing for tooltip position, which + * can be absolute pixels, or relative percentage. + * Or can be an object, like `{left: 10, top: 30}`, or `{right: + * '20%', bottom: 40}`. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * Or: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * + `'inside'` + * + * Center position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'top'` + * + * Top position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'left'` + * + * Left position of the graphic element where the mouse is in, + * which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'right'` + * + * Right position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + `'bottom'` + * + * Bottom position of the graphic element where the mouse is + * in, which is only valid when + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'item'`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.position + */ + position?: any[] | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The content formatter of tooltip's floating layer which supports + * string template and callback function. + * + * **1\. String template** + * + * The template variables are `{a}`, `{b}`, `{c}`, `{d}` and + * `{e}`, which stands for series name, data name and data value + * and ect. When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is set to be `'axis'`, there may be data from multiple series. + * In this time, series index can be refered as `{a0}`, `{a1}`, + * or `{a2}`. + * + * `{a}`, `{b}`, `{c}`, `{d}` have different meanings for different + * series types: + * + * + Line (area) charts, bar (column) charts, K charts: `{a}` + * for series name, `{b}` for category name, `{c}` for data + * value, `{d}` for none; + * + * + Scatter (bubble) charts: `{a}` for series name, `{b}` for + * data name, `{c}` for data value, `{d}` for none; + * + * + Map: `{a}` for series name, `{b}` for area name, `{c}` + * for merging data, `{d}` for none; + * + * + Pie charts, gauge charts, funnel charts: `{a}` for series + * name, `{b}` for data item name, `{c}` for data value, `{d}` + * for percentage. + * + * **Example:** + * + * ``` + * formatter: '{b0}: {c0}
{b1}: {c1}' + * + * ``` + * + * **2\. Callback function** + * + * The format of callback function: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * The first parameter `params` is the data that the formatter + * needs. Its format is shown as follows: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * When + * [trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * is `'axis'`, or when tooltip is triggered by + * [axisPointer](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis.axisPointer) + * , `params` is the data array of multiple series. + * The content of each item of the array is the same as above. + * Besides, + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * **Note:** Using array to present all the parameters in ECharts + * 2.x is not supported anymore. + * + * The second parameter `ticket` is the asynchronous callback + * flag which should be used along with the third parameter + * `callback` when it is used. + * + * The third parameter `callback` is asynchronous callback. + * When the content of tooltip is acquired asynchronously, `ticket` + * and `htm` as introduced above can be used to update tooltip + * with callback. + * + * Example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.formatter + */ + formatter?: Function | string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The background color of tooltip's floating layer. + * + * + * @default + * "rgba(50,50,50,0.7)" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.backgroundColor + */ + backgroundColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border color of tooltip's floating layer. + * + * + * @default + * '#333' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.borderColor + */ + borderColor?: string; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The border width of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.borderWidth + */ + borderWidth?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The floating layer of tooltip space around content. + * The unit is px. + * Default values for each position are 5. + * And they can be set to different values with left, right, + * top, and bottom. + * + * Examples: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip) + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.padding + */ + padding?: number; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * The text syle of tooltip's floating layer. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle + */ + textStyle?: { + + /** + * text color. + * + * + * @default + * "#fff" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 14 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.fontSize + */ + fontSize?: number; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.line.tooltip.textStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.lineHeight + */ + lineHeight?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.textStyle.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + + /** + * + * > **Notice:**series.tooltip only works when + * > [tooltip.trigger](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip.trigger) + * > is `'item'`. + * + * Extra CSS style for floating layer. + * The following is an example for adding shadow. + * + * ``` + * extraCssText: 'box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);' + * + * ``` + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.tooltip.extraCssText + */ + extraCssText?: string; + }; + } + } +} diff --git a/types/echarts/options/series/lines.d.ts b/types/echarts/options/series/lines.d.ts new file mode 100644 index 0000000000..fd740d69e6 --- /dev/null +++ b/types/echarts/options/series/lines.d.ts @@ -0,0 +1,14931 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **Lines graph** + * + * It is used to draw the line data with the information about "from" + * and "to"; and it is applied fot drawing the air routes on map, which + * visualizes these routes. + * + * ECharts 2.x + * uses the `markLine` to draw the migrating effect, while in ECharts + * 3, the `lines` graph is recommended to be used. + * + * **Migrating example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines + */ + interface SeriesLines { + + /** + * @default + * "lines" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.name + */ + name?: string; + + /** + * The coordinate used in the series, whose options are: + * + * + `'cartesian2d'` + * + * Use a two-dimensional rectangular coordinate (also known as Cartesian + * coordinate), with + * [xAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.xAxisIndex) + * and + * [yAxisIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.yAxisIndex) + * to assign the corresponding axis component. + * + * + `'geo'` + * + * Use geographic coordinate, with + * [geoIndex](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.geoIndex) + * to assign the corresponding geographic coordinate components. + * + * + * @default + * "geo" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.coordinateSystem + */ + coordinateSystem?: string; + + /** + * Index of + * [x axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#xAxis) + * to combine with, which is useful for multiple x axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.xAxisIndex + */ + xAxisIndex?: number; + + /** + * Index of + * [y axis](https://ecomfe.github.io/echarts-doc/public/en/option.html#yAxis) + * to combine with, which is useful for multiple y axes in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.yAxisIndex + */ + yAxisIndex?: number; + + /** + * Index of + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * to combine with, which is useful for multiple geographic axes + * in one chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.geoIndex + */ + geoIndex?: number; + + /** + * If draw as polyline. + * + * Default to be `false`. Can only draw a two end straight line. + * + * If it is set true, + * [data.coords](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.coords) + * can have more than two coord to draw a polyline. + * It is useful when visualizing GPS track data. See example + * [lines-bus](https://ecomfe.github.io/echarts-examples/public/editor.html?c=lines-bmap-bus) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.polyline + */ + polyline?: boolean; + + /** + * The setting about special effect of lines. + * + * **Tips:** All the graphs with trail effect should be put on a + * individual layer, which means that + * [zlevel](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.zlevel) + * need to be different with others. And the animation ( + * [animation](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animation) + * : false) of this layer is suggested to be turned off at the meanwhile. + * Otherwise, other graphic elements in other series and the + * [label](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label) + * of animation would produce unnecessary ghosts. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect + */ + effect?: { + + /** + * Whether to show special effect. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.show + */ + show?: boolean; + + /** + * The duration of special effect, which unit is second. + * + * + * @default + * 4 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.period + */ + period?: number; + + /** + * Effect animation delay. + * Can be number or callback function. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.delay + */ + delay?: Function | number; + + /** + * If symbol movement of special effect has a constant speed, + * which unit is pixel per second. + * [period](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.period) + * will be ignored if `constantSpeed` is larger than 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.constantSpeed + */ + constantSpeed?: number; + + /** + * The symbol of special effect. + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.effect) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.effect) + * + * The above example uses a custom path of plane shape. + * + * **Tip:** Ahe angle of symbol changes as the tangent of track + * changes. + * If you use a custom path, you should make sure that the path + * shape are upward oriented. + * It would ensure that the symbol will always move toward the + * right moving direction when the symbol moves along the track. + * + * + * @default + * "circle" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.symbol + */ + symbol?: string; + + /** + * The symbol size of special effect, which could be set as + * single number such as `10`. + * What's more, arrays could be used to decribe the width and + * height respectively. + * For instance, `[20, 10]` indicates `20` for width and `10` + * for height. + * + * + * @default + * 3 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.symbolSize + */ + symbolSize?: any[] | number; + + /** + * The color of special effect symbol, which defaults to be + * same with + * [lineStyle.color](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.color) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.color + */ + color?: string; + + /** + * The length of trail of special effect. + * The values from 0 to 1 could be set. + * Trail would be longer as the the value becomes larger. + * + * + * @default + * 0.2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.trailLength + */ + trailLength?: number; + + /** + * Whether to loop the special effect animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.effect.loop + */ + loop?: boolean; + }; + + /** + * Whether to enable the optimization of large-scale lines graph. + * It could be enabled when there is a particularly large number + * of data(>=5k) . + * + * After being enabled, + * [largeThreshold](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.largeThreshold) + * can be used to indicate the minimum number for turning on the + * optimization. + * + * The style of a single data item can't be customized + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.large + */ + large?: boolean; + + /** + * The threshold enabling the drawing optimization. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.largeThreshold + */ + largeThreshold?: number; + + /** + * Symbol type at the two ends of the line. + * It can be an array for two ends, or assigned seperately. See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.markLine.data.0.symbol) + * for more format information. + * + * + * @default + * "none" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @default + * 10 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.symbolSize + */ + symbolSize?: any[] | number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle + */ + lineStyle?: { + + /** + * Line color. Color is taken from + * [option.color Palette](https://ecomfe.github.io/echarts-doc/public/en/option.html#color) + * by default. + * + * Supports callback functions, in the form of: + * + * ``` + * (params: Object) => Color + * + * ``` + * + * Input parameters are `seriesIndex`, `dataIndex`, `data`, + * `value`, and etc. of data item. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides single + * colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.lineStyle) + * + * + * @default + * "self-adaptive" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not be + * drawn when set to 0. + * + * + * @default + * 0.5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.opacity + */ + opacity?: number; + + /** + * The curveness of edge. + * The values from 0 to 1 could be set. + * The curveness would be larger as the the value becomes larger. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lineStyle.curveness + */ + curveness?: number; + }; + + /** + * Label settings. Does not work when + * [polyline](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.polyline) + * is `true`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.show + */ + show?: boolean; + + /** + * the position of label, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template and + * callback function. + * In either form, `\n` is supported to represent a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for example,`{@product}`refers + * the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, for + * example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, right, + * bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple table + * or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because that each text fregment + * is layout based on the `content box`, where it makes no sense + * that calculating width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and height + * of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * Emphasis style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.lineStyle.opacity + */ + opacity?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.show + */ + show?: boolean; + + /** + * the position of label, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * `progressive` specifies the amount of graphic elements that can + * be rendered within a frame (about 16ms) if "progressive rendering" + * enabled. + * + * When data amount is from thousand to more than 10 million, it + * will take too long time to render all of the graphic elements. + * Since ECharts 4, "progressive rendering" is supported in its + * workflow, which processes and renders data chunk by chunk alone + * with each frame, avoiding to block the UI thread of the browser. + * + * + * @default + * 400 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.progressive + */ + progressive?: number; + + /** + * If current data amount is over the threshold, "progressive rendering" + * is enabled. + * + * + * @default + * 3000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.progressiveThreshold + */ + progressiveThreshold?: number; + + /** + * The data set of lines. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data + */ + data?: { + + /** + * the name of data. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.name + */ + name?: string; + + /** + * An array includes two ore more than two coordinates. + * Each coordinate could be `[x, y]` in + * [rectangular coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#grid) + * and `[lng, lat]` in + * [geographic coordinate](https://ecomfe.github.io/echarts-doc/public/en/option.html#geo) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.coords + */ + coords?: any[]; + + /** + * The line style of this data item. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.lineStyle.curveness + */ + curveness?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.show + */ + show?: boolean; + + /** + * the position of label, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis + */ + emphasis?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.lineStyle.curveness + */ + curveness?: number; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.show + */ + show?: boolean; + + /** + * the position of label, options: + * + * + `'start'` + * + `'middle'` + * + `'end'` + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.data.emphasis.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Mark point in a chart. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint + */ + markPoint?: { + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * + * @default + * "pin" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an array + * to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and height + * is`10`. + * + * If size of symbols needs to be different, you can set with + * callback function in the following format: + * + * ``` + * (value: Array|number, params: Object) => number|Array + * + * ``` + * + * The first parameter `value` is the value in + * [data](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-.data) + * , and the second parameter `params` is the rest parameters + * of data item. + * + * + * @default + * 50 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.symbolSize + */ + symbolSize?: any[] | Function | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively use + * tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position of + * data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset to + * default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be at data + * position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.silent + */ + silent?: boolean; + + /** + * Label of mark point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @default + * "inside" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.offset + */ + offset?: any[]; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {@score}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.formatter + */ + formatter?: Function | string; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array for mark points, each of which is an object. + * Here are some ways to assign mark point position. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * **For example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data + */ + data?: { + + /** + * Mark point name. + * + * + * @default + * '' + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.name + */ + name?: string; + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.value + */ + value?: number; + + /** + * Symbol of . + * + * Icon types provided by ECharts includes `'circle'`, `'rect'`, + * `'roundRect'`, `'triangle'`, `'diamond'`, `'pin'`, `'arrow'`, + * `'none'` + * + * It can be set to an image with `'image://url'` , in which + * URL is the link to an image, or `dataURI` of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent from + * jagging and blurring when scaled, and have a better control + * over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.symbol + */ + symbol?: string; + + /** + * symbol size. + * It can be set to single numbers like `10`, or use an + * array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, and + * height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of symbol. + * Note that when `symbol` is set to be `'arrow'` in `markLine`, + * `symbolRotate` value will be ignored, and compulsively + * use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of symbol relative to original position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or image, + * you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative percentage + * value. + * + * For example, `[0, '50%']` means to move upside side position + * of symbol height. + * It can be used to make the arrow in the bottom to be + * at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Mark point style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.data.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markPoint) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * prefix + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markPoint.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Use a line in the chart to illustrate. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine + */ + markLine?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.silent + */ + silent?: boolean; + + /** + * Symbol type at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * See + * [data.symbol](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.symbol) + * for more format information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.symbol + */ + symbol?: any[] | string; + + /** + * Symbol size at the two ends of the mark line. + * It can be an array for two ends, or assigned seperately. + * + * **Attention:** You cannot assgin width and height seperately + * as normal `symbolSize`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Precison of marking line value, which is useful when displaying + * average value mark line. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.precision + */ + precision?: number; + + /** + * Mark line text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a new + * line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, for + * example,`{@product}`refers the value of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the index of`n`, + * for example,`{@\[3\]}\` refers the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent a + * new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value at + * dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by formatter, + * which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + + /** + * Mark line style. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.lineStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Data array of marking line. + * Every array item can be an array of one or two values, representing + * starting and ending point of the line, and every item is + * an object. + * Here are several ways to assign the positions of starting + * and ending point. + * + * 1. Assign coordinate according to container with + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.y) + * attribute, in which pixel values and percentage are supported. + * + * When multiple attributes exist, priority is as the above + * order. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data + */ + data?: { + + /** + * Data of the starting point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0 + */ + 0?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.value + */ + value?: number; + + /** + * Symbol of starting point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.symbol + */ + symbol?: string; + + /** + * starting point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of starting point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of starting point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.0.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + + /** + * Data of the ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1 + */ + 1?: { + + /** + * X position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.x + */ + x?: number; + + /** + * Y position according to container, in pixel. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.y + */ + y?: number; + + /** + * Label value, which can be ignored. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.value + */ + value?: number; + + /** + * Symbol of ending point. + * + * Icon types provided by ECharts includes `'circle'`, + * `'rect'`, `'roundRect'`, `'triangle'`, `'diamond'`, + * `'pin'`, `'arrow'`, `'none'` + * + * It can be set to an image with `'image://url'` , + * in which URL is the link to an image, or `dataURI` + * of an image. + * + * An image URL example: + * + * ``` + * 'image://http://xxx.xxx.xxx/a/b.png' + * + * ``` + * + * A `dataURI` example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1) + * + * Icons can be set to arbitrary vector path via `'path://'` + * in ECharts. + * As compared with raster image, vector paths prevent + * from jagging and blurring when scaled, and have a + * better control over changing colors. + * Size of vectoer icon will be adapted automatically. + * Refer to + * [SVG PathData](http://www.w3.org/TR/SVG/paths.html#PathData) + * for more information about format of path. + * You may export vector paths from tools like Adobe + * Illustrator. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.symbol + */ + symbol?: string; + + /** + * ending point symbol size. + * It can be set to single numbers like `10`, or use + * an array to represent width and height. + * For example, `[20, 10]` means symbol width is `20`, + * and height is`10`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.symbolSize + */ + symbolSize?: any[] | number; + + /** + * Rotate degree of ending point symbol. + * Note that when `symbol` is set to be `'arrow'` in + * `markLine`, `symbolRotate` value will be ignored, + * and compulsively use tangent angle. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.symbolRotate + */ + symbolRotate?: number; + + /** + * Whether to keep aspect for symbols in the form of + * `path://`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.symbolKeepAspect + */ + symbolKeepAspect?: boolean; + + /** + * Offset of ending point symbol relative to original + * position. + * By default, symbol will be put in the center position + * of data. + * But if symbol is from user-defined vector path or + * image, you may not expect symbol to be in center. + * In this case, you may use this attribute to set offset + * to default position. + * It can be in absolute pixel value, or in relative + * percentage value. + * + * For example, `[0, '50%']` means to move upside side + * position of symbol height. + * It can be used to make the arrow in the bottom to + * be at data position when symbol is pin. + * + * + * @default + * [0, 0] + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.symbolOffset + */ + symbolOffset?: any[]; + + /** + * Line style of this data item, which will be merged + * with `lineStyle` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle + */ + lineStyle?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1.lineStyle) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1.lineStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from 0 to + * 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.curveness + */ + curveness?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis + */ + emphasis?: { + + /** + * Line color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1.lineStyle.emphasis) + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.color + */ + color?: string; + + /** + * line width. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.width + */ + width?: number; + + /** + * line type. + * + * Options are: + * + * + `'solid'` + * + `'dashed'` + * + `'dotted'` + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.type + */ + type?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1.lineStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.opacity + */ + opacity?: number; + + /** + * Edge curvature, which supports value from + * 0 to 1. + * The larger the value, the greater the curvature. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.lineStyle.emphasis.curveness + */ + curveness?: number; + }; + }; + + /** + * Label of this data item, which will be merged with + * `label` of starting point and ending point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label + */ + label?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.position + */ + position?: string; + + /** + * Data label formatter, which supports string template + * and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value of`'product'\` + * dimension。 + * + `{@[n]}: the value of a dimension at the index + * of`n`, for example,`{@\[3\]}\` refers the value + * at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed by + * formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.formatter + */ + formatter?: Function | string; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether show label or not. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Positions of labels can be: + * + * + `'start'` starting point of the line. + * + `'middle'` middle point of the line. + * + `'end'` ending point of the line. + * + * + * @default + * "end" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.emphasis.position + */ + position?: string; + + /** + * Data label formatter, which supports string + * template and callback function. + * In either form, `\n` is supported to represent + * a new line. + * + * **String template** + * + * Model variation includes: + * + * + `{a}`: series name. + * + `{b}`: the name of a data item. + * + `{c}`: the value of a data item. + * + `{d}`: the percent. + * + `{@xxx}: the value of a dimension named`'xxx'`, + * for example,`{@product}`refers the value + * of`'product'\` dimension。 + * + `{@[n]}: the value of a dimension at the + * index of`n`, for example,`{@\[3\]}\` refers + * the value at dimensions\[3\]. + * + * **example:** + * + * ``` + * formatter: '{b}: {d}' + * + * ``` + * + * **Callback function** + * + * Callback function is in form of: + * + * ``` + * (params: Object|Array) => string + * + * ``` + * + * where `params` is the single dataset needed + * by formatter, which is formed as: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.data.1.label.emphasis.formatter + */ + formatter?: Function | string; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markLine) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markLine.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * Used to mark an area in chart. + * For example, mark a time interval. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea + */ + markArea?: { + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to + * mouse events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.silent + */ + silent?: boolean; + + /** + * Label in mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values to + * represent position of label relative to top-left corner + * of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value represents + * rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent level + * will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` in + * parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of `[top, + * right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, which + * represents the percent of `contentWidth` (that is, the + * width without `padding`) of its container box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on `outerWith` + * in prectice. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width and + * height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` property. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive value + * represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis) + * + * `width` or `height` can be specified when using background + * image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding of + * `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: [3, 4, + * 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make simple + * table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` (that + * is, the width without `padding`) of its container + * box. + * It is based on `contentWidth` because that each text + * fregment is layout based on the `content box`, where + * it makes no sense that calculating width based on + * `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as visual + * color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + + /** + * Style of the mark area. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for example + * `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, or `'dotted'`. + * `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will not + * be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example `'rgb(128, + * 128, 128)'`. + * RGBA can be used when you need alpha channel, for + * example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported besides + * single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to that of + * `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component will + * not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * The scope of the area is defined by `data`, which is an array + * with two item, representing the left-top point and the right-bottom + * point of rectangle area. + * Each item can be defined as follows: + * + * 1. + * Specify the coordinate in screen coordinate system using + * [x](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.x) + * , + * [y](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.y) + * , where the unit is pixel (e.g., + * the value is `5`), or percent (e.g., + * the value is `'35%'`). + * + * The priority follows as above if more than one above definition + * used. + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data + */ + data?: { + + /** + * Specify the left-top point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0 + */ + 0?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.0.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + + /** + * Specify the right-bottom point. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1 + */ + 1?: { + + /** + * x value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.x + */ + x?: number; + + /** + * y value on screen coordinate system, can be pixel + * number (like `5`), or percent value (like `'20%'`). + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.y + */ + y?: number; + + /** + * value of the item, not necessary. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.value + */ + value?: number; + + /** + * Style of the item. + * `itemStyle` of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle + */ + itemStyle?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for example + * `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.color + */ + color?: string; + + /** + * border color, whose format is similar to that + * of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with `shadowColor`,`shadowOffsetX`, + * `shadowOffsetY` to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.itemStyle) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction of + * shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.opacity + */ + opacity?: number; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis + */ + emphasis?: { + + /** + * color. + * + * > Color can be represented in RGB, for example + * `'rgb(128, 128, 128)'`. + * RGBA can be used when you need alpha channel, + * for example `'rgba(128, 128, 128, 0.5)'`. + * You may also use hexadecimal format, for + * example `'#ccc'`. + * Gradient color and texture are also supported + * besides single colors. + * > + * > [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.color + */ + color?: string; + + /** + * border color, whose format is similar to + * that of `color`. + * + * + * @default + * "#000" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.borderColor + */ + borderColor?: string; + + /** + * border width. + * No border when it is set to be 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border type, which can be `'solid'`, `'dashed'`, + * or `'dotted'`. `'solid'` by default. + * + * + * @default + * "solid" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.borderType + */ + borderType?: string; + + /** + * Size of shadow blur. + * This attribute should be used along with + * `shadowColor`,`shadowOffsetX`, `shadowOffsetY` + * to set shadow to component. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.itemStyle.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow color. + * Support same format as `color`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Offset distance on the horizontal direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Offset distance on the vertical direction + * of shadow. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Opacity of the component. + * Supports value from 0 to 1, and the component + * will not be drawn when set to 0. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.itemStyle.emphasis.opacity + */ + opacity?: number; + }; + }; + + /** + * Label style of the item. + * Label style of start point and end point will be + * merged together. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label + */ + label?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel values + * to represent position of label relative to top-left + * corner of bounding box. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, `verticalAlign` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label) + * + * `width` or `height` can be specified when using + * background image, or auto adapted by default. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, 4, 4, + * 4]`. + * + `padding: [3, 4]`: represents `padding: [3, + * 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify it. + * You may want to use it in some cases like make + * simple table or using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * `width` can also be percent string, like `'100%'`, + * which represents the percent of `contentWidth` + * (that is, the width without `padding`) of its + * container box. + * It is based on `contentWidth` because that each + * text fregment is layout based on the `content + * box`, where it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like using + * background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the width + * and height of the content, without `padding`. + * + * Notice, `width` and `height` only work when `rich` + * specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned as + * visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this `rich` + * property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will be + * used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent + * of `contentWidth` (that is, the width + * without `padding`) of its container box. + * It is based on `contentWidth` because + * that each text fregment is layout based + * on the `content box`, where it makes + * no sense that calculating width based + * on `outerWith` in prectice. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only work + * when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis + */ + emphasis?: { + + /** + * Whether to show label. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.show + */ + show?: boolean; + + /** + * Label position. + * + * **Followings are the options:** + * + * + \[x, y\] + * + * Use relative percentage, or absolute pixel + * values to represent position of label relative + * to top-left corner of bounding box. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis) + * + * + 'top' + * + * + 'left' + * + 'right' + * + 'bottom' + * + 'inside' + * + 'insideLeft' + * + 'insideRight' + * + 'insideTop' + * + 'insideBottom' + * + 'insideTopLeft' + * + 'insideBottomLeft' + * + 'insideTopRight' + * + 'insideBottomRight' + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/view.html?c=doc-example/label-position) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.position + */ + position?: any[] | string; + + /** + * Distance to the host graphic element. + * Works when position is string value (like + * `'top'`、`'insideRight'`). + * + * See: + * [label position](https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/label-position) + * . + * + * + * @default + * 5 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.distance + */ + distance?: number; + + /** + * Rotate label, from -90 degree to 90, positive + * value represents rotate anti-clockwise. + * + * See: + * [label rotation](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-label-rotation) + * . + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rotate + */ + rotate?: number; + + /** + * Whether to move text slightly. + * For example: `[30, 40]` means move `30` horizontally + * and move `40` vertically. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.offset + */ + offset?: any[]; + + /** + * text color. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic by + * default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, `align` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic by + * default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in `rich`, + * `verticalAlign` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, `lineHeight` + * in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, `'red'`, + * `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis) + * + * `width` or `height` can be specified when + * using background image, or auto adapted by + * default. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for example: + * + * + `padding: [3, 4, 5, 6]`: represents padding + * of `[top, right, bottom, left]`. + * + `padding: 4`: represents `padding: [4, + * 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to specify + * it. + * You may want to use it in some cases like + * make simple table or using background image + * (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * `width` can also be percent string, like + * `'100%'`, which represents the percent of + * `contentWidth` (that is, the width without + * `padding`) of its container box. + * It is based on `contentWidth` because that + * each text fregment is layout based on the + * `content box`, where it makes no sense that + * calculating width based on `outerWith` in + * prectice. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases like + * using background image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies the + * width and height of the content, without + * `padding`. + * + * Notice, `width` and `height` only work when + * `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will assigned + * as visual color, such as series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.textShadowOffsetY + */ + textShadowOffsetY?: number; + + /** + * "Rich text styles" can be defined in this + * `rich` property. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis) + * + * For more details, see + * [Rich Text](https://ecomfe.github.io/echarts-doc/public/en/option.htmltutorial.html#Rich%20Text) + * please. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich + */ + rich?: { + + /** + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E + */ + [userStyle: string]: { + + /** + * text color. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * ""#fff"" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.color + */ + color?: string; + + /** + * font style + * + * Options are: + * + * + `'normal'` + * + `'italic'` + * + `'oblique'` + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontStyle + */ + fontStyle?: string; + + /** + * font thick weight + * + * Options are: + * + * + `'normal'` + * + `'bold'` + * + `'bolder'` + * + `'lighter'` + * + 100 | 200 | 300 | 400... + * + * + * @default + * "normal" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontWeight + */ + fontWeight?: string; + + /** + * font family + * + * Can also be 'serif' , 'monospace', + * ... + * + * + * @default + * "sans-serif" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontFamily + */ + fontFamily?: string; + + /** + * font size + * + * + * @default + * 12 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.fontSize + */ + fontSize?: number; + + /** + * Horizontal alignment of text, automatic + * by default. + * + * Options are: + * + * + `'left'` + * + `'center'` + * + `'right'` + * + * If `align` is not set in `rich`, + * `align` in parent level will be used. + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.align + */ + align?: string; + + /** + * Vertical alignment of text, automatic + * by default. + * + * Options are: + * + * + `'top'` + * + `'middle'` + * + `'bottom'` + * + * If `verticalAlign` is not set in + * `rich`, `verticalAlign` in parent + * level will be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.verticalAlign + */ + verticalAlign?: string; + + /** + * Line height of the text fregment. + * + * If `lineHeight` is not set in `rich`, + * `lineHeight` in parent level will + * be used. For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.lineHeight + */ + lineHeight?: number; + + /** + * Background color of the text fregment. + * + * Can be color string, like `'#123234'`, + * `'red'`, `rgba(0,23,11,0.3)'`. + * + * Or image can be used, for example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E) + * + * `width` or `height` can be specified + * when using background image, or auto + * adapted by default. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.backgroundColor + */ + backgroundColor?: object | string; + + /** + * Border color of the text fregment. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderColor + */ + borderColor?: string; + + /** + * Border width of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderWidth + */ + borderWidth?: number; + + /** + * Border radius of the text fregment. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.borderRadius + */ + borderRadius?: number; + + /** + * Padding of the text fregment, for + * example: + * + * + `padding: [3, 4, 5, 6]`: represents + * padding of `[top, right, bottom, + * left]`. + * + `padding: 4`: represents `padding: + * [4, 4, 4, 4]`. + * + `padding: [3, 4]`: represents `padding: + * [3, 4, 3, 4]`. + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.padding + */ + padding?: any[] | number; + + /** + * Shadow color of the text block. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowColor + */ + shadowColor?: string; + + /** + * Show blur of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowBlur + */ + shadowBlur?: number; + + /** + * Shadow X offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetX + */ + shadowOffsetX?: number; + + /** + * Shadow Y offset of the text block. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.shadowOffsetY + */ + shadowOffsetY?: number; + + /** + * Width of the text block. + * It is the width of the text by default. + * In most cases, there is no need to + * specify it. + * You may want to use it in some cases + * like make simple table or using background + * image (see `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * `width` can also be percent string, + * like `'100%'`, which represents the + * percent of `contentWidth` (that is, + * the width without `padding`) of its + * container box. + * It is based on `contentWidth` because + * that each text fregment is layout + * based on the `content box`, where + * it makes no sense that calculating + * width based on `outerWith` in prectice. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.width + */ + width?: number | string; + + /** + * Height of the text block. + * It is the width of the text by default. + * You may want to use it in some cases + * like using background image (see + * `backgroundColor`). + * + * Notice, `width` and `height` specifies + * the width and height of the content, + * without `padding`. + * + * Notice, `width` and `height` only + * work when `rich` specified. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.height + */ + height?: number | string; + + /** + * Storke color of the text. + * + * If set as `'auto'`, the color will + * assigned as visual color, such as + * series color. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderColor + */ + textBorderColor?: string; + + /** + * Storke line width of the text. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textBorderWidth + */ + textBorderWidth?: number; + + /** + * Shadow color of the text itself. + * + * + * @default + * "transparent" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowColor + */ + textShadowColor?: string; + + /** + * Shadow blue of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowBlur + */ + textShadowBlur?: number; + + /** + * Shadow X offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetX + */ + textShadowOffsetX?: number; + + /** + * Shadow Y offset of the text itself. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.data.1.label.emphasis.rich.%3Cuser%20defined%20style%20name%3E.textShadowOffsetY + */ + textShadowOffsetY?: number; + }; + }; + }; + }; + }; + }; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger + * than threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback + * function for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports + * callback function for different data to have different animation + * effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines.markArea) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.markArea.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + }; + + /** + * `zlevel` value of all graghical elements in lines graph. + * + * `zlevel` is used to make layers with Canvas. + * Graphical elements with different `zlevel` values will be placed + * in different Canvases, which is a common optimization technique. + * We can put those frequently changed elements (like those with + * animations) to a seperate `zlevel`. + * Notice that too many Canvases will increase memory cost, and + * should be used carefully on mobile phones to avoid crash. + * + * Canvases with bigger `zlevel` will be placed on Canvases with + * smaller `zlevel`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.zlevel + */ + zlevel?: number; + + /** + * `z` value of all graghical elements in lines graph, which controls + * order of drawing graphical components. + * Components with smaller `z` values may be overwritten by those + * with larger `z` values. + * + * `z` has a lower priority to `zlevel`, and will not create new + * Canvas. + * + * + * @default + * 2 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.z + */ + z?: number; + + /** + * Whether to ignore mouse events. + * Default value is false, for triggering and responding to mouse + * events. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.silent + */ + silent?: boolean; + + /** + * Whether to enable animation. + * + * + * @default + * "true" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animation + */ + animation?: boolean; + + /** + * Whether to set graphic number threshold to animation. + * Animation will be disabled when graphic number is larger than + * threshold. + * + * + * @default + * 2000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationThreshold + */ + animationThreshold?: number; + + /** + * Duration of the first animation, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines) + * + * + * @default + * 1000 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationDuration + */ + animationDuration?: Function | number; + + /** + * Easing method used for the first animation. + * Varied easing effects can be found at + * [easing effect example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=line-easing) + * . + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationEasing + */ + animationEasing?: string; + + /** + * Delay before updating the first animation, which supports callback + * function for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationDelay + */ + animationDelay?: Function | number; + + /** + * Time for animation to complete, which supports callback function + * for different data to have different animation effect: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines) + * + * + * @default + * 300 + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationDurationUpdate + */ + animationDurationUpdate?: Function | number; + + /** + * Easing method used for animation. + * + * + * @default + * "cubicOut" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationEasingUpdate + */ + animationEasingUpdate?: string; + + /** + * Delay before updating animation, which supports callback function + * for different data to have different animation effect. + * + * For example: + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.lines) + * + * See + * [this example](https://ecomfe.github.io/echarts-examples/public/editor.html?c=bar-animation-delay) + * for more information. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-lines.animationDelayUpdate + */ + animationDelayUpdate?: Function | number; + } + } +} diff --git a/types/echarts/options/series/map.d.ts b/types/echarts/options/series/map.d.ts new file mode 100644 index 0000000000..417d9c3518 --- /dev/null +++ b/types/echarts/options/series/map.d.ts @@ -0,0 +1,16402 @@ +declare namespace echarts { + namespace EChartOption { + /** + * **Map.** + * + * Map is maily used in the visulization of geographic area data, which + * can be used with + * [visualMap](https://ecomfe.github.io/echarts-doc/public/en/option.html#visualMap) + * component to visualize the datas such as population distribution + * density in diffrent areas. + * + * Series of same + * [map type](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map.map) + * will show in one map. + * At this point, the configuration of the first series will be used + * for the map configuration. + * + * **Example:** + * + * [see doc](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map) + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map + */ + interface SeriesMap { + + /** + * @default + * "map" + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map.type + */ + type?: string; + + /** + * Component ID, not specified by default. + * If specified, it can be used to refer the component in option + * or API. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map.id + */ + id?: string; + + /** + * Series name used for displaying in + * [tooltip](https://ecomfe.github.io/echarts-doc/public/en/option.html#tooltip) + * and filtering with + * [legend](https://ecomfe.github.io/echarts-doc/public/en/option.html#legend) + * , or updaing data and configuration with `setOption`. + * + * + * @see https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map.name + */ + name?: string; + + /** + * Map charts. + * + * Due to the increase of fineness of map, ECharts 3 doesn't include + * map data by default for package size consideration. + * You may find map files you need on + * [map download page](http://ecomfe.github.io/echarts-builder-web/map3.html + * ) + * and then include and register them in ECharts. + * + * Two formats of map data are provided in ECharts, one of which + * can be included in ` \n' + + "but do b.ca", + { + ignoreTags: ["script", "style"] + } +); + +/* nl2br */ + +/* tagName */ + +linkifyHtml("github.com", { + tagName: "span" +}); + +linkifyHtml("#swag", { + tagName: { + hashtag: "span" + } +}); + +/* target */ + +linkifyHtml("github.com", { + target: "_parent" +}); + +linkifyHtml("test-email@example.com", { + target: { + url: "_parent", + email: null + } +}); + +/* validate */ + +// Don't linkify links that don't begin in a protocol +// e.g., "http://google.com" will be linkified, but "google.com" will not. +linkifyHtml("www.google.com", { + validate: { + url(value) { + return /^(http|ftp)s?:\/\//.test(value); + } + } +}); diff --git a/types/linkifyjs/tsconfig.json b/types/linkifyjs/tsconfig.json new file mode 100644 index 0000000000..be83a56929 --- /dev/null +++ b/types/linkifyjs/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "linkifyjs-tests.ts" + ] +} diff --git a/types/linkifyjs/tslint.json b/types/linkifyjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/linkifyjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f0b7bad3514c863feb8dce8a3c107c774028b331 Mon Sep 17 00:00:00 2001 From: Sean Zhu Date: Wed, 28 Nov 2018 23:38:27 -0800 Subject: [PATCH 0973/1121] rm 'types/linkifyjs/.prettierrc.yml' --- types/linkifyjs/.prettierrc.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 types/linkifyjs/.prettierrc.yml diff --git a/types/linkifyjs/.prettierrc.yml b/types/linkifyjs/.prettierrc.yml deleted file mode 100644 index f2c03d3a72..0000000000 --- a/types/linkifyjs/.prettierrc.yml +++ /dev/null @@ -1,8 +0,0 @@ -tabWidth: 4 -overrides: - - files: ".prettierrc.yml" - options: - tabWidth: 2 - - files: "tsconfig.json" - options: - printWidth: 1 From 14e3429c27feeff00c417c58f9242d991ada091c Mon Sep 17 00:00:00 2001 From: Sean Zhu Date: Thu, 29 Nov 2018 00:05:02 -0800 Subject: [PATCH 0974/1121] [linkifyjs] Add .html.d.ts to files --- types/linkifyjs/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/types/linkifyjs/tsconfig.json b/types/linkifyjs/tsconfig.json index be83a56929..52b1940fcd 100644 --- a/types/linkifyjs/tsconfig.json +++ b/types/linkifyjs/tsconfig.json @@ -19,6 +19,7 @@ }, "files": [ "index.d.ts", + "html.d.ts", "linkifyjs-tests.ts" ] } From 27544c9615a45820dd7c3e6435845531075ee2d7 Mon Sep 17 00:00:00 2001 From: Sean Zhu Date: Thu, 29 Nov 2018 00:10:26 -0800 Subject: [PATCH 0975/1121] [linkifyjs] Fix lint errors --- types/linkifyjs/html.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/linkifyjs/html.d.ts b/types/linkifyjs/html.d.ts index e366d52fc0..d21de0e3c3 100644 --- a/types/linkifyjs/html.d.ts +++ b/types/linkifyjs/html.d.ts @@ -1,4 +1,4 @@ import { LinkifyOptions } from "./index"; -export let linkifyHtml: (input: string, options?: LinkifyOptions) => string; +export function linkifyHtml(input: string, options?: LinkifyOptions): string; export default linkifyHtml; From 3c744b74bec078faa9a9227ea23c00ffdc0a132a Mon Sep 17 00:00:00 2001 From: Lucas Motta Date: Thu, 29 Nov 2018 10:32:40 +0000 Subject: [PATCH 0976/1121] Fix ci problems --- types/ssh2-streams/index.d.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/types/ssh2-streams/index.d.ts b/types/ssh2-streams/index.d.ts index e80e529ced..df1e001e0a 100644 --- a/types/ssh2-streams/index.d.ts +++ b/types/ssh2-streams/index.d.ts @@ -1,7 +1,6 @@ // Type definitions for ssh2-streams v0.1.9 // Project: https://github.com/mscdex/ssh2-streams // Definitions by: Ron Buckton -// Definitions by: Lucas Motta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -1631,11 +1630,6 @@ export interface TransferOptions { step?: (total_transferred: number, chunk: number, total: number) => void; } -export interface ReadFileOptions { - encoding?: string - flag?: string -} - export interface ReadStreamOptions { flags?: string; encoding?: string; @@ -1704,4 +1698,9 @@ export interface ParsedKey { publicOrig: Buffer; ppk?: boolean; privateMAC?: string; +} + +export interface ReadFileOptions { + encoding?: string; + flag?: string; } \ No newline at end of file From 5c1c6b290b6446c1ba270e083286d1c487da9c2f Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Thu, 29 Nov 2018 13:12:37 +0100 Subject: [PATCH 0977/1121] [crumb] add typings --- types/crumb/crumb-tests.ts | 47 +++++++++++++++ types/crumb/index.d.ts | 114 +++++++++++++++++++++++++++++++++++++ types/crumb/tsconfig.json | 23 ++++++++ types/crumb/tslint.json | 1 + 4 files changed, 185 insertions(+) create mode 100644 types/crumb/crumb-tests.ts create mode 100644 types/crumb/index.d.ts create mode 100644 types/crumb/tsconfig.json create mode 100644 types/crumb/tslint.json diff --git a/types/crumb/crumb-tests.ts b/types/crumb/crumb-tests.ts new file mode 100644 index 0000000000..90612a3e4a --- /dev/null +++ b/types/crumb/crumb-tests.ts @@ -0,0 +1,47 @@ +import * as hapi from 'hapi'; +import * as crumb from 'crumb'; + +const server = new hapi.Server({ port: 8000 }); + +server.register({ + plugin: crumb, + options: { + key: 'csrf-token', + size: 50, + autoGenerate: true, + addToViewContext: true, + cookieOptions: { + path: '/', + }, + headerName: 'X-CSRF-Token', + restful: true, + skip: () => false, + enforce: true, + logUnauthorized: false, + } +}); + +server.route({ + method: 'get', + path: '/', + handler: async (_, h) => { + return h.continue; + }, +}); + +server.route({ + method: 'get', + path: '/custom', + options: { + plugins: { + crumb: { + key: 'x-csrf-token', + source: 'query', + restful: true, + }, + }, + }, + handler: async (_, h) => { + return h.continue; + }, +}); diff --git a/types/crumb/index.d.ts b/types/crumb/index.d.ts new file mode 100644 index 0000000000..16311c99bf --- /dev/null +++ b/types/crumb/index.d.ts @@ -0,0 +1,114 @@ +// Type definitions for crumb 7.2 +// Project: https://github.com/hapijs/crumb +// Definitions by: Silas Rech +// Simon Schick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import { Request, Plugin, ResponseToolkit, ServerStateCookieOptions } from 'hapi'; + +declare module 'hapi' { + interface PluginSpecificConfiguration { + crumb?: boolean | { + /** + * The name of the cookie to store the CSRF crumb into. + */ + key?: string; + + /** + * Specifies how the crumb will be sent in requests. + * + * @default 'payload' + */ + source?: 'payload' | 'query'; + + /** + * Override for the server's 'restful' setting + */ + restful?: boolean; + }; + } +} + +declare namespace crumb { + type SkipFunction = (request?: Request, h?: ResponseToolkit) => boolean; + + interface RegisterOptions { + /** + * The name of the cookie to store the CSRF crumb into. + * + * @default 'crumb' + */ + key?: string; + + /** + * The length of the crumb to generate. + * See {@link https://github.com/hapijs/cryptiles cryptiles} for more information. + * + * @default 43 + */ + size?: number; + + /** + * Whether to automatically generate a new crumb for requests. + * + * @default true + */ + autoGenerate?: boolean; + + /** + * Whether to automatically add the crumb to view contexts as the given key. + * + * @default true + */ + addToViewContext?: boolean; + + /** + * Storage options for the cookie containing the crumb + * + * @default { path: '/' } + */ + cookieOptions?: ServerStateCookieOptions; + + /** + * Specify the name of the custom CSRF header. + * + * @default 'X-CSRF-Token' + */ + headerName?: string; + + /** + * RESTful mode that validates crumb tokens from 'X-CSRF-Token' request header for POST, PUT, PATCH and DELETE server routes. + * Disables payload/query crumb validation. + * + * @default false + */ + restful?: boolean; + + /** + * A function which when provided, is called for every request. + * If the provided function returns true, validation and generation of crumb is skipped. + * + * @default false + */ + skip?: boolean | SkipFunction; + + /** + * Using enforce with false will set the CSRF header cookie but won't execute the validation. + * + * @default true + */ + enforce?: boolean; + + /** + * Whether to add to the request log with tag 'crumb' and data 'validation failed'. + * + * @default false + */ + logUnauthorized?: boolean; + } +} + +declare const crumb: Plugin; + +export = crumb; diff --git a/types/crumb/tsconfig.json b/types/crumb/tsconfig.json new file mode 100644 index 0000000000..5beceb6a88 --- /dev/null +++ b/types/crumb/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "crumb-tests.ts" + ] +} diff --git a/types/crumb/tslint.json b/types/crumb/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/crumb/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 7b89694607cb4a4d602f7600bb582880075b03cd Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:08:35 +0100 Subject: [PATCH 0978/1121] [@types/ssh2-sftp-client] "Formatting: Either use all tabs, or always use 4 spaces" --- types/ssh2-sftp-client/index.d.ts | 65 ++++++++++++++++++------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 2dcaee74e6..165af77ab4 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -5,35 +5,48 @@ import * as ssh2 from 'ssh2'; import * as ssh2Stream from 'ssh2-streams'; + export = sftp; declare class sftp { - connect(options: ssh2.ConnectConfig): Promise; - list(remoteFilePath: string): Promise; - get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; - fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; - put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise; - fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise; - mkdir(remoteFilePath: string, recursive?: boolean): Promise; - rmdir(remoteFilePath: string, recursive?: boolean): Promise; - delete(remoteFilePath: string): Promise; - rename(remoteSourcePath: string, remoteDestPath: string): Promise; - end(): Promise; - on(event: string, callback: (...args: any[]) => void): void; + connect(options: ssh2.ConnectConfig): Promise; + + list(remoteFilePath: string): Promise; + + get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; + + fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; + + put(input: string | Buffer | NodeJS.ReadableStream, remoteFilePath: string, useCompression?: boolean, encoding?: string): Promise; + + fastPut(localPath: string, emoteFilePath: string, options?: ssh2Stream.TransferOptions): Promise; + + mkdir(remoteFilePath: string, recursive?: boolean): Promise; + + rmdir(remoteFilePath: string, recursive?: boolean): Promise; + + delete(remoteFilePath: string): Promise; + + rename(remoteSourcePath: string, remoteDestPath: string): Promise; + + end(): Promise; + + on(event: string, callback: (...args: any[]) => void): void; } + declare namespace sftp { - interface FileInfo { - type: string; - name: string; - size: number; - modifyTime: number; - accessTime: number; - rights: { - user: string; - group: string; - other: string; - }; - owner: number; - group: number; - } + interface FileInfo { + type: string; + name: string; + size: number; + modifyTime: number; + accessTime: number; + rights: { + user: string; + group: string; + other: string; + }; + owner: number; + group: number; + } } From 8046ef23ae267844626edf0a8f20a91ba0acfad1 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:13:29 +0100 Subject: [PATCH 0979/1121] [@types/ssh2-sftp-client] added type definitions for methods 'exists', 'stat' and 'chmod' --- types/ssh2-sftp-client/index.d.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 165af77ab4..8089810fa9 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for ssh2-sftp-client 2.3 +// Type definitions for ssh2-sftp-client 2.4 // Project: https://www.npmjs.com/package/ssh2-sftp-client -// Definitions by: igrayson , Ascari Andrea , Kartik Malik +// Definitions by: igrayson , Ascari Andrea , Kartik Malik , Michael Pertl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as ssh2 from 'ssh2'; @@ -13,6 +13,10 @@ declare class sftp { list(remoteFilePath: string): Promise; + exists(remotePath: string): Promise; + + stat(remotePath: string): Promise + get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; fastGet(remoteFilePath: string, localPath: string, options?: ssh2Stream.TransferOptions): Promise; @@ -29,6 +33,8 @@ declare class sftp { rename(remoteSourcePath: string, remoteDestPath: string): Promise; + chmod(remotePath: string, mode: number | string): Promise; + end(): Promise; on(event: string, callback: (...args: any[]) => void): void; @@ -49,4 +55,14 @@ declare namespace sftp { owner: number; group: number; } + + interface FileStats { + mode: number; + permissions?: any; + owner: number; + group: number; + size: number; + accessTime: number; + modifyTime: number; + } } From c74a7e8088af068f6e1925eb5c953affd3d05a45 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:23:22 +0100 Subject: [PATCH 0980/1121] [@types/ssh2-sftp-client] multi-line "definitions by"; added new tests --- types/ssh2-sftp-client/index.d.ts | 5 ++++- types/ssh2-sftp-client/ssh2-sftp-client-tests.ts | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 8089810fa9..ac0c0847ee 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for ssh2-sftp-client 2.4 // Project: https://www.npmjs.com/package/ssh2-sftp-client -// Definitions by: igrayson , Ascari Andrea , Kartik Malik , Michael Pertl +// Definitions by: igrayson +// Ascari Andrea +// Kartik Malik +// Michael Pertl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as ssh2 from 'ssh2'; diff --git a/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts index 8a9c99fde1..d59e552990 100644 --- a/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts +++ b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts @@ -1,5 +1,6 @@ import Client = require('ssh2-sftp-client'); import * as fs from 'fs'; + const client = new Client(); client.connect({ @@ -11,6 +12,10 @@ client.connect({ client.list('/remote/path').then(() => null); +client.exists('/remote/path').then(() => null); + +client.stat('/remote/path').then(() => null); + client.get('/remote/path').then(stream => stream.read(0)); client.get('/remote/path', true, 'utf8').then(stream => stream.read(0)); client.get('/remote/path', true, null).then(stream => stream.read(0)); @@ -30,6 +35,8 @@ client.delete('remote/path').then(() => null); client.rename('/remote/from', '/remote/to').then(() => null); +client.chmod('/remote/path', 777).then(() => null); + client.end().then(() => null); client.on('event', () => null); From c042e6eacaf7a1f17d7a46af8a331dc3a417e7a8 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:29:27 +0100 Subject: [PATCH 0981/1121] [@types/ssh2-sftp-client] added missing semicolon --- types/ssh2-sftp-client/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index ac0c0847ee..c568571eb5 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -18,7 +18,7 @@ declare class sftp { exists(remotePath: string): Promise; - stat(remotePath: string): Promise + stat(remotePath: string): Promise; get(remoteFilePath: string, useCompression?: boolean, encoding?: string | null): Promise; From 0faecf90db4bfe0652254f12fabc07cca8ff1916 Mon Sep 17 00:00:00 2001 From: Mateusz Glapinski Date: Thu, 29 Nov 2018 17:21:08 +0100 Subject: [PATCH 0982/1121] * overloads few methods that should return Promise if a callback parameter is omitted * adds HostedFieldsHostedFieldsFieldName type * update tests --- types/braintree-web/index.d.ts | 36 +++++++++++++++++++------------- types/braintree-web/test/node.ts | 6 +++--- types/braintree-web/test/web.ts | 13 +++++++----- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/types/braintree-web/index.d.ts b/types/braintree-web/index.d.ts index bc5ca0b01f..a2cfdb06c1 100644 --- a/types/braintree-web/index.d.ts +++ b/types/braintree-web/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/braintree/braintree-web // Definitions by: Guy Shahine // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 /** * @module braintree-web/american-express @@ -359,7 +360,8 @@ declare namespace braintree { * }); * @static */ - create: (options: { authorization: string }, callback: callback) => void; + create(options: { authorization: string }): Promise; + create(options: { authorization: string }, callback: callback): void; /** * @description The current version of the SDK, i.e. `3.0.2`. @@ -439,7 +441,8 @@ declare namespace braintree { * @param {callback} callback The second argument, `data`, is the {@link DataCollector} instance. * @returns {void} */ - create: (options: { client: Client, kount: boolean, paypal: boolean }, callback: callback) => void; + create(options: { client: Client, kount: boolean, paypal: boolean }): Promise; + create(options: { client: Client, kount: boolean, paypal: boolean }, callback: callback): void; /** * @description The current version of the SDK, i.e. `3.0.2`. @@ -591,18 +594,15 @@ declare namespace braintree { * @property {?HostedFields~hostedFieldsFieldData} fields.expirationYear {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the expiration year field, if it is present. * @property {?HostedFields~hostedFieldsFieldData} fields.postalCode {@link HostedFields~hostedFieldsFieldData|hostedFieldsFieldData} for the postal code field, if it is present. */ - interface HostedFieldsFieldDataFields { - number: HostedFieldsHostedFieldsFieldData; - cvv: HostedFieldsHostedFieldsFieldData; - expirationDate: HostedFieldsHostedFieldsFieldData; - expirationMonth: HostedFieldsHostedFieldsFieldData; - expirationYear: HostedFieldsHostedFieldsFieldData; - postalCode: HostedFieldsHostedFieldsFieldData; - } + type HostedFieldsHostedFieldsFieldName = 'number' | 'cvv' | 'expirationDate' | 'expirationMonth' | 'expirationYear' | 'postalCode'; + + type HostedFieldsFieldDataFields = { + [key in HostedFieldsHostedFieldsFieldName]: HostedFieldsHostedFieldsFieldData; + }; interface HostedFieldsStateObject { cards: HostedFieldsHostedFieldsCard[]; - emittedBy: string; + emittedBy: HostedFieldsHostedFieldsFieldName; fields: HostedFieldsFieldDataFields; } @@ -666,7 +666,8 @@ declare namespace braintree { * } * }, callback); */ - create: (options: { client: Client, fields: HostedFieldFieldOptions, styles: any }, callback: callback) => void; + create(options: { client: Client, fields: HostedFieldFieldOptions, styles: any }): Promise; + create(options: { client: Client, fields: HostedFieldFieldOptions, styles: any }, callback: callback): void; /** @@ -726,7 +727,7 @@ declare namespace braintree { * }); * @returns {void} */ - on(event: string, handler: ((event: any) => any)): void; + on(event: string, handler: ((event: HostedFieldsStateObject) => void)): void; /** * Cleanly tear down anything set up by {@link module:braintree-web/hosted-fields.create|create} @@ -785,7 +786,9 @@ declare namespace braintree { * }); * @returns {void} */ - tokenize(options?: { vault: boolean }, callback?: callback): void; + tokenize(options?: { vault?: boolean, cardholderName?: string, billingAddress?: any }): Promise; + tokenize(options: { vault?: boolean, cardholderName?: string, billingAddress?: any }, callback: callback): void; + tokenize(callback: callback): void; /** * Add a class to a {@link module:braintree-web/hosted-fields~field field}. Useful for updating field styles when events occur elsewhere in your checkout. @@ -1138,7 +1141,8 @@ declare namespace braintree { * client: client * }, callback); */ - create: (options: { client: Client }, callback: callback) => void; + create(options: { client: Client }): Promise; + create(options: { client: Client }, callback: callback): void; /** * @description The current version of the SDK, i.e. `3.0.2`. @@ -1207,6 +1211,7 @@ declare namespace braintree { * } * }); */ + verifyCard(options: { nonce: string, amount: number, addFrame: (err?: BraintreeError, iframe?: HTMLIFrameElement) => void, removeFrame?: () => void }): Promise; verifyCard(options: { nonce: string, amount: number, addFrame: (err?: BraintreeError, iframe?: HTMLIFrameElement) => void, removeFrame: () => void }, callback: callback): void; /** @@ -1751,3 +1756,4 @@ declare namespace braintree { export = braintree; export as namespace braintree; + diff --git a/types/braintree-web/test/node.ts b/types/braintree-web/test/node.ts index 9eed5b228d..59db2fb944 100644 --- a/types/braintree-web/test/node.ts +++ b/types/braintree-web/test/node.ts @@ -6,7 +6,7 @@ let clientToken: string = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiO braintree.client.create({ authorization: clientToken -}, function (error: braintree.BraintreeError, clientInstance: any) { +}, function (error: braintree.BraintreeError, clientInstance: braintree.Client) { var form: HTMLFormElement = document.getElementById('my-form-id') as HTMLFormElement; var data: { creditCard: braintree.CreditCardInfo } = { @@ -396,7 +396,7 @@ let submitNonceToServer: (nonce: string) => void; braintree.threeDSecure.verifyCard({ nonce: existingNonce, - amount: 123.45, + amount: 123.45, // $ExpectType number addFrame: function (err, iframe) { // Set up your UI and add the iframe. let my3DSContainer = document.createElement('div'); @@ -437,4 +437,4 @@ braintree.threeDSecure.cancelVerifyCard(function (err: braintree.BraintreeError, verifyPayload.nonce; // The nonce returned from the 3ds lookup call verifyPayload.liabilityShifted; // boolean verifyPayload.liabilityShiftPossible; // boolean -}); +}); \ No newline at end of file diff --git a/types/braintree-web/test/web.ts b/types/braintree-web/test/web.ts index 22073363d4..1801cbb497 100644 --- a/types/braintree-web/test/web.ts +++ b/types/braintree-web/test/web.ts @@ -1,10 +1,13 @@ +import { ApplePay } from ".."; +import * as braintree from ".."; + let version: string = braintree.VERSION; let clientToken: string = "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiI0YjlhYzVmYmI4ZTNkYzQzMmFkZjJhNzBlNjZlMWNjY2M5ODRkYzE4ZTM4YmY4NjYzZTM5NjM3NWZjYmQzY2U5fGNyZWF0ZWRfYXQ9MjAxNi0wOS0wOFQwNTowMzo0MC4xNjk1NTUwMzUrMDAwMFx1MDAyNm1lcmNoYW50X2lkPTM0OHBrOWNnZjNiZ3l3MmJcdTAwMjZwdWJsaWNfa2V5PTJuMjQ3ZHY4OWJxOXZtcHIiLCJjb25maWdVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvMzQ4cGs5Y2dmM2JneXcyYi9jbGllbnRfYXBpL3YxL2NvbmZpZ3VyYXRpb24iLCJjaGFsbGVuZ2VzIjpbXSwiZW52aXJvbm1lbnQiOiJzYW5kYm94IiwiY2xpZW50QXBpVXJsIjoiaHR0cHM6Ly9hcGkuc2FuZGJveC5icmFpbnRyZWVnYXRld2F5LmNvbTo0NDMvbWVyY2hhbnRzLzM0OHBrOWNnZjNiZ3l3MmIvY2xpZW50X2FwaSIsImFzc2V0c1VybCI6Imh0dHBzOi8vYXNzZXRzLmJyYWludHJlZWdhdGV3YXkuY29tIiwiYXV0aFVybCI6Imh0dHBzOi8vYXV0aC52ZW5tby5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tIiwiYW5hbHl0aWNzIjp7InVybCI6Imh0dHBzOi8vY2xpZW50LWFuYWx5dGljcy5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tLzM0OHBrOWNnZjNiZ3l3MmIifSwidGhyZWVEU2VjdXJlRW5hYmxlZCI6dHJ1ZSwicGF5cGFsRW5hYmxlZCI6dHJ1ZSwicGF5cGFsIjp7ImRpc3BsYXlOYW1lIjoiQWNtZSBXaWRnZXRzLCBMdGQuIChTYW5kYm94KSIsImNsaWVudElkIjpudWxsLCJwcml2YWN5VXJsIjoiaHR0cDovL2V4YW1wbGUuY29tL3BwIiwidXNlckFncmVlbWVudFVybCI6Imh0dHA6Ly9leGFtcGxlLmNvbS90b3MiLCJiYXNlVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0ZXdheS5jb20iLCJhc3NldHNVcmwiOiJodHRwczovL2NoZWNrb3V0LnBheXBhbC5jb20iLCJkaXJlY3RCYXNlVXJsIjpudWxsLCJhbGxvd0h0dHAiOnRydWUsImVudmlyb25tZW50Tm9OZXR3b3JrIjp0cnVlLCJlbnZpcm9ubWVudCI6Im9mZmxpbmUiLCJ1bnZldHRlZE1lcmNoYW50IjpmYWxzZSwiYnJhaW50cmVlQ2xpZW50SWQiOiJtYXN0ZXJjbGllbnQzIiwiYmlsbGluZ0FncmVlbWVudHNFbmFibGVkIjp0cnVlLCJtZXJjaGFudEFjY291bnRJZCI6ImFjbWV3aWRnZXRzbHRkc2FuZGJveCIsImN1cnJlbmN5SXNvQ29kZSI6IlVTRCJ9LCJjb2luYmFzZUVuYWJsZWQiOmZhbHNlLCJtZXJjaGFudElkIjoiMzQ4cGs5Y2dmM2JneXcyYiIsInZlbm1vIjoib2ZmIn0="; braintree.client.create({ authorization: clientToken -}, function (error: braintree.BraintreeError, clientInstance: any) { +}, function (error: braintree.BraintreeError, clientInstance: braintree.Client) { var form: HTMLFormElement = document.getElementById('my-form-id') as HTMLFormElement; var data: { creditCard: braintree.CreditCardInfo } = { @@ -62,7 +65,7 @@ braintree.client.create({ select: true } } - }, function (hostedFieldsErr?: braintree.BraintreeError, hostedFieldsInstance?: any) { + }, function (hostedFieldsErr?: braintree.BraintreeError, hostedFieldsInstance?: braintree.HostedFields) { if (hostedFieldsErr) { // Handle error in Hosted Fields creation @@ -178,7 +181,7 @@ braintree.client.create({ }); }); - braintree.applePay.create({ client: clientInstance }, function (createErr?: braintree.BraintreeError, applePayInstance?: any) { + braintree.applePay.create({ client: clientInstance }, function (createErr?: braintree.BraintreeError, applePayInstance?: ApplePay) { if (createErr) { // Handle error in client creation console.log(`Error Code: ${error.code}, Type: ${error.type}, Message: ${error.message}, Details: ${error.details}`); @@ -194,7 +197,7 @@ braintree.client.create({ total: { label: 'Your Label', amount: '10.00' }, }; - var paymentRequest = braintree.applePay.createPaymentRequest(request); + var paymentRequest = applePayInstance.createPaymentRequest(request); console.log(paymentRequest); // { total: { }, countryCode: 'US', currencyCode: 'USD', merchantCapabilities: [ ], supportedNetworks: [ ] } @@ -394,7 +397,7 @@ let submitNonceToServer: (nonce: string) => void; braintree.threeDSecure.verifyCard({ nonce: existingNonce, - amount: 123.45, + amount: 123.45, // $ExpectType number addFrame: function (err, iframe) { // Set up your UI and add the iframe. let my3DSContainer = document.createElement('div'); From e02b8523a1f3ea4f6788de1dee5727e43ad9a053 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 29 Nov 2018 17:29:43 +0100 Subject: [PATCH 0983/1121] improve superagent.agent() typing --- types/superagent/index.d.ts | 2 +- types/superagent/superagent-tests.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/types/superagent/index.d.ts b/types/superagent/index.d.ts index 971cc3c4c2..261ea99bed 100644 --- a/types/superagent/index.d.ts +++ b/types/superagent/index.d.ts @@ -45,7 +45,7 @@ declare namespace request { // tslint:disable-next-line:unified-signatures (method: string, url: string): SuperAgentRequest; - agent(): SuperAgent; + agent(): this & Request & SuperAgent; serialize: { [type: string]: Serializer }; parse: { [type: string]: Parser }; } diff --git a/types/superagent/superagent-tests.ts b/types/superagent/superagent-tests.ts index c063c819be..2e13d5b90a 100644 --- a/types/superagent/superagent-tests.ts +++ b/types/superagent/superagent-tests.ts @@ -421,3 +421,15 @@ request .get('/echo') .use(echoPlugin) .end(); + +async function testDefaultOptions() { + // Default options for multiple requests + const agentWithDefaultOptions = request.agent() + .use(() => null) + .auth('digest', 'secret', {type:'auto'}); + + await agentWithDefaultOptions.get('/with-plugin-and-auth'); + await agentWithDefaultOptions.get('/also-with-plugin-and-auth'); +} + +testDefaultOptions(); From bf07afd86497cc8195477b8be5e904f830514159 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 29 Nov 2018 17:34:25 +0100 Subject: [PATCH 0984/1121] improve formatting and whitespaces --- types/superagent/superagent-tests.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/types/superagent/superagent-tests.ts b/types/superagent/superagent-tests.ts index 2e13d5b90a..44ef7cf773 100644 --- a/types/superagent/superagent-tests.ts +++ b/types/superagent/superagent-tests.ts @@ -424,9 +424,10 @@ request async function testDefaultOptions() { // Default options for multiple requests - const agentWithDefaultOptions = request.agent() + const agentWithDefaultOptions = request + .agent() .use(() => null) - .auth('digest', 'secret', {type:'auto'}); + .auth('digest', 'secret', { type: 'auto' }); await agentWithDefaultOptions.get('/with-plugin-and-auth'); await agentWithDefaultOptions.get('/also-with-plugin-and-auth'); From 09cf6f908a2bd4d341d80a89aa735d52fd5ad8a9 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Thu, 29 Nov 2018 17:36:21 +0100 Subject: [PATCH 0985/1121] update header --- types/superagent/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/superagent/index.d.ts b/types/superagent/index.d.ts index 261ea99bed..c10ff467bb 100644 --- a/types/superagent/index.d.ts +++ b/types/superagent/index.d.ts @@ -6,6 +6,7 @@ // Shrey Jain // Alec Zopf // Adam Haglund +// Lukas Elmer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 From 84d0e5f3c6ed696e578b99865567b4ad93814368 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:24:47 -0700 Subject: [PATCH 0986/1121] update react-flatpickr definitions --- types/react-flatpickr/index.d.ts | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index a0a9725ccd..973f30efc9 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,18 +1,26 @@ -// Type definitions for react-flatpickr 3.2 +// Type definitions for react-flatpickr 3.6.4 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar +// snaveevans // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 -import { Component } from 'react'; -import flatpickr from 'flatpickr'; +import { Component } from "react"; +import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - value?: string; - className?: string; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From f8ad24974118da570659fcaf7a6f35271e828f15 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:42:10 -0700 Subject: [PATCH 0987/1121] refactor react-flatpickr test --- .../react-flatpickr/react-flatpickr-tests.tsx | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index 452d8529b4..ce7122a47f 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -1,22 +1,48 @@ -import flatpickr from 'flatpickr'; -import * as React from 'react'; -import DatePicker from 'react-flatpickr'; +import flatpickr from "flatpickr"; +import * as React from "react"; +import DatePicker from "react-flatpickr"; -const noParamsElement = ; +const noParamsElement = ; -const defaultValueElement = ; +const defaultValueElement = ; const options = { - dateFormat: 'YYYY-MM-DD' + dateFormat: "YYYY-MM-DD" }; -const optionsElement = ; +const optionsElement = ; -const onChange = ( - selectedDates: Date[], dateStr: string, instance: flatpickr.Instance, +const hook = ( + selectedDates: Date[], + dateStr: string, + instance: flatpickr.Instance, elem: HTMLElement ) => null; -const onChangeElement = ; +const onChangeElement = ; +const onOpenElement = ; +const onCloseElement = ; +const onMonthChangeElement = ; +const onYearChangeElement = ; +const onReadyElement = ; +const onValueUpdateElement = ; +const onDayCreateElement = ; -const valueElement = ; +const valueStringElement = ; +const valueDateElement = ; +const valueNumberElement = ; +const valueStringArrayElement = ( + +); +const valueDateArrayElement = ( + +); +const valueNumberArrayElement = ( + +); -const classNameElement = ; +const wrappedElement = ( + + + +); From 0085b9868c6252a56fed4690444231dbd8cb8099 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:45:23 -0700 Subject: [PATCH 0988/1121] react-flatpickr remove minor version --- types/react-flatpickr/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 973f30efc9..9f60b4d7be 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-flatpickr 3.6.4 +// Type definitions for react-flatpickr 3.6 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans @@ -9,18 +9,18 @@ import { Component } from "react"; import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - onOpen?: flatpickr.Options.Hook; - onClose?: flatpickr.Options.Hook; - onMonthChange?: flatpickr.Options.Hook; - onYearChange?: flatpickr.Options.Hook; - onReady?: flatpickr.Options.Hook; - onValueUpdate?: flatpickr.Options.Hook; - onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; - children?: JSX.Element; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From c652a0afb4330ca150f1755bba040cf72b4ec5f5 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:47:37 -0700 Subject: [PATCH 0989/1121] Revert "react-flatpickr remove minor version" This reverts commit 0085b9868c6252a56fed4690444231dbd8cb8099. --- types/react-flatpickr/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 9f60b4d7be..973f30efc9 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-flatpickr 3.6 +// Type definitions for react-flatpickr 3.6.4 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans @@ -9,18 +9,18 @@ import { Component } from "react"; import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - onOpen?: flatpickr.Options.Hook; - onClose?: flatpickr.Options.Hook; - onMonthChange?: flatpickr.Options.Hook; - onYearChange?: flatpickr.Options.Hook; - onReady?: flatpickr.Options.Hook; - onValueUpdate?: flatpickr.Options.Hook; - onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; - children?: JSX.Element; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From 5baad0aabf25ca9416d93f06c479d8c6e790a938 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 11:48:28 -0700 Subject: [PATCH 0990/1121] react-flatpickr remove patch version --- types/react-flatpickr/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 973f30efc9..9f60b4d7be 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-flatpickr 3.6.4 +// Type definitions for react-flatpickr 3.6 // Project: https://github.com/coderhaoxin/react-flatpickr // Definitions by: begincalendar // snaveevans @@ -9,18 +9,18 @@ import { Component } from "react"; import flatpickr from "flatpickr"; export interface DateTimePickerProps { - defaultValue?: string; - options?: flatpickr.Options.Options; - onChange?: flatpickr.Options.Hook; - onOpen?: flatpickr.Options.Hook; - onClose?: flatpickr.Options.Hook; - onMonthChange?: flatpickr.Options.Hook; - onYearChange?: flatpickr.Options.Hook; - onReady?: flatpickr.Options.Hook; - onValueUpdate?: flatpickr.Options.Hook; - onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; - children?: JSX.Element; + defaultValue?: string; + options?: flatpickr.Options.Options; + onChange?: flatpickr.Options.Hook; + onOpen?: flatpickr.Options.Hook; + onClose?: flatpickr.Options.Hook; + onMonthChange?: flatpickr.Options.Hook; + onYearChange?: flatpickr.Options.Hook; + onReady?: flatpickr.Options.Hook; + onValueUpdate?: flatpickr.Options.Hook; + onDayCreate?: flatpickr.Options.Hook; + value?: string | Date | number | Array; + children?: JSX.Element; } export default class DatePicker extends Component {} From 47b4772299affae7d56351a46668c9624d3b0aba Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 12:01:10 -0700 Subject: [PATCH 0991/1121] react-flatpickr use ReadonlyArray --- types/react-flatpickr/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index 9f60b4d7be..f9b817bd00 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -19,7 +19,7 @@ export interface DateTimePickerProps { onReady?: flatpickr.Options.Hook; onValueUpdate?: flatpickr.Options.Hook; onDayCreate?: flatpickr.Options.Hook; - value?: string | Date | number | Array; + value?: string | Date | number | ReadonlyArray; children?: JSX.Element; } From 278797da32ebf66fa7bea64cbae7251b074cfa12 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Thu, 29 Nov 2018 12:08:44 -0800 Subject: [PATCH 0992/1121] Fix HTML brackets --- types/office-js/index.d.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 6df2026b54..3e7f64375f 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -3282,10 +3282,10 @@ declare namespace Office { * * * - * < - * < - * < - * < + * + * + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
OneNote Y
PowerPoint Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
OneNote Y
PowerPoint Y Y Y Y
Word Y Y Y Y
*/ settings: Settings; @@ -4699,8 +4699,8 @@ declare namespace Office { * * * - * < - * < + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
Word Y Y Y Y
*/ columnCount: number; @@ -4721,8 +4721,8 @@ declare namespace Office { * * * - * < - * < + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
Word Y Y Y Y
*/ hasHeaders: boolean; @@ -4756,8 +4756,8 @@ declare namespace Office { * * * - * < - * < + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
Word Y Y Y Y
*/ rowCount: number; @@ -4795,8 +4795,8 @@ declare namespace Office { * * * - * < - * < + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. @@ -4835,8 +4835,8 @@ declare namespace Office { * * * - * < - * < + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param rows An array of arrays ("matrix") or a TableData object that contains one or more rows of data to add to the table. Required. @@ -4863,8 +4863,8 @@ declare namespace Office { * * * - * < - * < + * + * *
Office for Windows desktop Office Online (in browser) Office for iPad Office for Mac
Access Y
Excel Y Y Y Y
Word Y Y Y Y
Excel Y Y Y Y
Word Y Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. From 3bc0b5bec959415292efd71bf5c188eb170b550e Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 13:25:36 -0700 Subject: [PATCH 0993/1121] react-flatpickr allow Element array --- types/react-flatpickr/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-flatpickr/index.d.ts b/types/react-flatpickr/index.d.ts index f9b817bd00..5e3b12fdf8 100644 --- a/types/react-flatpickr/index.d.ts +++ b/types/react-flatpickr/index.d.ts @@ -20,7 +20,7 @@ export interface DateTimePickerProps { onValueUpdate?: flatpickr.Options.Hook; onDayCreate?: flatpickr.Options.Hook; value?: string | Date | number | ReadonlyArray; - children?: JSX.Element; + children?: JSX.Element | JSX.Element[]; } export default class DatePicker extends Component {} From 0ccda5781a317728dc62b4889daac7f8a1b396b0 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 29 Nov 2018 13:31:29 -0700 Subject: [PATCH 0994/1121] react-flatpickr test multiple elements --- types/react-flatpickr/react-flatpickr-tests.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/react-flatpickr/react-flatpickr-tests.tsx b/types/react-flatpickr/react-flatpickr-tests.tsx index ce7122a47f..c51f527707 100644 --- a/types/react-flatpickr/react-flatpickr-tests.tsx +++ b/types/react-flatpickr/react-flatpickr-tests.tsx @@ -46,3 +46,10 @@ const wrappedElement = (
); + +const wrappedElements = ( + + + + +); From 56761f59b80614fbfc67fd190cbe11f9461f4919 Mon Sep 17 00:00:00 2001 From: Dobes Vandermeer Date: Thu, 29 Nov 2018 12:40:58 -0800 Subject: [PATCH 0995/1121] Add hint to CollectionAggregationOptions Although this option is, for some reason, not document. It is supported. It follows the format specified here: https://docs.mongodb.com/manual/reference/command/aggregate/ --- types/mongodb/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/mongodb/index.d.ts b/types/mongodb/index.d.ts index b31a8dd7b9..11d425dc30 100644 --- a/types/mongodb/index.d.ts +++ b/types/mongodb/index.d.ts @@ -1294,6 +1294,7 @@ export interface CollectionAggregationOptions { * Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ bypassDocumentValidation?: boolean; + hint?: string | Object; raw?: boolean; promoteLongs?: boolean; promoteValues?: boolean; From 03ae76d4ec1efd6f1ee51d9f8861ec284b808ed2 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Thu, 29 Nov 2018 18:54:27 -0300 Subject: [PATCH 0996/1121] chore: update definitions Update definitions to match those defined by the library author --- types/unist/index.d.ts | 39 ++++++++++++++++++++++++++++++-------- types/unist/unist-tests.ts | 2 -- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 7433ddcc13..389b26e04f 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -1,40 +1,63 @@ // Type definitions for Unist 2.0 -// Project: https://github.com/syntax-tree/unist +// Project: https://github.com/syntax-tree/unist-ts // Definitions by: bizen241 // Jun Lu +// Hernan Rajchert +// Titus Wormer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 3.1 +export as namespace Unist + +// Syntactic units in unist syntax trees are called nodes. export interface Node { + // The variant of a node. type: string; + + // Information from the ecosystem. data?: Data; + + // Location of a node in a source document. + // Must not be present if a node is generated. position?: Position; } export interface Data { - [key: string]: any; + [key: string]: unknown; } +// Location of a node in a source file. export interface Position { + // Place of the first character of the parsed source region. start: Point; + + // Place of the first character after the parsed source region. end: Point; - /** >= 1 */ - indent?: number[]; + + // Start column at each index (plus start line) in the source region, + // for elements that span multiple lines. + indent: number[]; } +// One place in a source file. export interface Point { - /** >= 1 */ + // Line in a source file (1-indexed integer). line: number; - /** >= 1 */ + + // Column in a source file (1-indexed integer). column: number; - /** >= 0 */ + + // Character in a source file (0-indexed integer). offset?: number; } +// Nodes containing other nodes. export interface Parent extends Node { + // List representing the children of a node. children: Node[]; } +// Nodes containing a value. export interface Literal extends Node { value: any; } diff --git a/types/unist/unist-tests.ts b/types/unist/unist-tests.ts index 3cb69bcc76..9ba2dc06d5 100644 --- a/types/unist/unist-tests.ts +++ b/types/unist/unist-tests.ts @@ -1,5 +1,3 @@ -import * as Unist from 'unist'; - const data: Unist.Data = { string: 'string', number: 1, From 2da1cef96f96157493360f98c607343ed90f6677 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Thu, 29 Nov 2018 19:40:11 -0300 Subject: [PATCH 0997/1121] fix: unist ts version --- types/unist/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 389b26e04f..55bea58e47 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -5,7 +5,7 @@ // Hernan Rajchert // Titus Wormer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.1 +// TypeScript Version: 3.0 export as namespace Unist From 221e85cc38797c6ac9845c134d35a21d8c40249a Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Thu, 29 Nov 2018 14:49:05 -0800 Subject: [PATCH 0998/1121] Add properties and measurements to trackDependency --- types/applicationinsights-js/applicationinsights-js-tests.ts | 2 +- types/applicationinsights-js/index.d.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts index c2adb63a30..ab52eb1537 100644 --- a/types/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -47,7 +47,7 @@ appInsights = { startTrackEvent(name: string) { return null; }, stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, - trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number) { return null; }, + trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object) { return null; }, trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel) { return null; }, trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; }) { return null; }, trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel) { return null; }, diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index ecfef55052..516556b8d3 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -732,8 +732,10 @@ declare module Microsoft.ApplicationInsights { * @param totalTime total request time * @param success indicates if the request was sessessful * @param resultCode response code returned by the dependency request + * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. + * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. */ - trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number): any; + trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object): any; /** * Log an exception you have caught. * @param exception An Error from a catch clause, or the string error message. From 5cce7fcb72b3a986f1315855d03503bb609263aa Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Thu, 29 Nov 2018 14:52:50 -0800 Subject: [PATCH 0999/1121] Add properties tests --- types/applicationinsights-js/applicationinsights-js-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts index ab52eb1537..d0e8b4eaaf 100644 --- a/types/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -86,7 +86,7 @@ appInsights.trackTrace("message", null); appInsights.trackTrace("message", { a: '1', b: '2' }, AI.SeverityLevel.Error); // trackDependency -appInsights.trackDependency("id", "POST", "http://example.com/test/abc", "/test/abc", null, true, null); +appInsights.trackDependency("id", "POST", "http://example.com/test/abc", "/test/abc", null, true, null, {prop1: 'abc'}, {meas1: 4.5}); // flush appInsights.flush(); From c5896588bfef15fd92daee5d76d38c73006b5a5f Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Thu, 29 Nov 2018 15:30:05 -0800 Subject: [PATCH 1000/1121] Reduce line length --- types/applicationinsights-js/applicationinsights-js-tests.ts | 3 ++- types/applicationinsights-js/index.d.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/applicationinsights-js/applicationinsights-js-tests.ts b/types/applicationinsights-js/applicationinsights-js-tests.ts index d0e8b4eaaf..de6de9a2c6 100644 --- a/types/applicationinsights-js/applicationinsights-js-tests.ts +++ b/types/applicationinsights-js/applicationinsights-js-tests.ts @@ -47,7 +47,8 @@ appInsights = { startTrackEvent(name: string) { return null; }, stopTrackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, trackEvent(name: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }) { return null; }, - trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object) { return null; }, + trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, + resultCode: number, properties?: { [name: string]: string }, measurements?: { [name: string]: number }) { return null; }, trackException(exception: Error, handledAt?: string, properties?: { [name: string]: string; }, measurements?: { [name: string]: number; }, severityLevel?: AI.SeverityLevel) { return null; }, trackMetric(name: string, average: number, sampleCount?: number, min?: number, max?: number, properties?: { [name: string]: string; }) { return null; }, trackTrace(message: string, properties?: { [name: string]: string; }, severityLevel?: AI.SeverityLevel) { return null; }, diff --git a/types/applicationinsights-js/index.d.ts b/types/applicationinsights-js/index.d.ts index 516556b8d3..2959e6da39 100644 --- a/types/applicationinsights-js/index.d.ts +++ b/types/applicationinsights-js/index.d.ts @@ -735,7 +735,8 @@ declare module Microsoft.ApplicationInsights { * @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty. * @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty. */ - trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, properties?: Object, measurements?: Object): any; + trackDependency(id: string, method: string, absoluteUrl: string, pathName: string, totalTime: number, success: boolean, resultCode: number, + properties?: { [name: string]: string }, measurements?: { [name: string]: number }): any; /** * Log an exception you have caught. * @param exception An Error from a catch clause, or the string error message. From 09b6f76746fa597d9bbbfea4cc32806d17349cf8 Mon Sep 17 00:00:00 2001 From: Law Smith Date: Thu, 29 Nov 2018 16:45:28 -0800 Subject: [PATCH 1001/1121] Added support for params when starting sagaTester. --- types/redux-saga-tester/index.d.ts | 28 +++---- types/redux-saga-tester/package.json | 7 ++ .../redux-saga-tester-tests.ts | 74 ++++++++++++------- 3 files changed, 65 insertions(+), 44 deletions(-) create mode 100644 types/redux-saga-tester/package.json diff --git a/types/redux-saga-tester/index.d.ts b/types/redux-saga-tester/index.d.ts index fda97e494b..5778edf1bd 100644 --- a/types/redux-saga-tester/index.d.ts +++ b/types/redux-saga-tester/index.d.ts @@ -1,27 +1,19 @@ // Type definitions for redux-saga-tester 1.0 // Project: https://github.com/wix/redux-saga-tester#readme -// Definitions by: Ben Lorantfy +// Definitions by: Ben Lorantfy , Law Smith // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.4 + +import {Task} from 'redux-saga'; +import {AnyAction, Middleware, Reducer, ReducersMapObject} from 'redux'; -export interface AnyAction { - type: string; - [key: string]: any; -} -export type Reducer = (state: object, action: AnyAction) => object; -export interface ReducerMap { - [key: string]: Reducer; -} -export type ReduxMiddleware = (options: { dispatch: (action: AnyAction) => void, getState: () => object }) - => (next: (action: AnyAction) => any) - => any; export type SagaFunction = (...args: any[]) => any; -export interface SagaTesterOptions { +export interface SagaTesterOptions { initialState?: StateType; - reducers?: ReducerMap|Reducer; - middlewares?: ReduxMiddleware[]; - combineReducers?: (map: ReducerMap) => Reducer; + reducers?: ReducersMapObject | Reducer; + middlewares?: Middleware[]; + combineReducers?: (map: ReducersMapObject) => Reducer; ignoreReduxActions?: boolean; options?: object; } @@ -32,7 +24,7 @@ export default class SagaTester { /** * Starts execution of the provided saga. */ - start(saga: SagaFunction): void; + start(saga: SagaFunction, ...args: any[]): Task; /** * Dispatches an action to the redux store. diff --git a/types/redux-saga-tester/package.json b/types/redux-saga-tester/package.json new file mode 100644 index 0000000000..8d41143894 --- /dev/null +++ b/types/redux-saga-tester/package.json @@ -0,0 +1,7 @@ +{ + "private": true, + "dependencies": { + "redux": "^3.7.2", + "redux-saga": "^0.15.3" + } +} diff --git a/types/redux-saga-tester/redux-saga-tester-tests.ts b/types/redux-saga-tester/redux-saga-tester-tests.ts index 0dba716533..4cd9c001c9 100644 --- a/types/redux-saga-tester/redux-saga-tester-tests.ts +++ b/types/redux-saga-tester/redux-saga-tester-tests.ts @@ -2,62 +2,79 @@ import SagaTester from 'redux-saga-tester'; // constructor with all options new SagaTester({ - initialState: { - orders: [], - }, - reducers: { - orders: (state, action) => state, - }, - middlewares: [ - ({ dispatch, getState }) => (next) => (action: { type: string }) => { - dispatch({ type: 'BLA' }); - getState(); + initialState: { + orders: [], + }, + reducers: { + orders: (state, action) => state, + }, + middlewares: [ + ({dispatch, getState}) => (next) => (action) => { + dispatch({type: 'BLA'}); + getState(); - return next(action); + return next(action); + }, + ], + ignoreReduxActions: false, + options: { + a: 23, }, - ], - ignoreReduxActions: false, - options: { - a: 23, - }, }); // constructor with function as reducers new SagaTester({ - reducers: (state, action) => state, + reducers: (state = {}, action) => state, +}); + +// constructor with reducer map +new SagaTester({ + reducers: { + a: (state, action) => state, + b: (state, action) => state, + c: (state, action) => state, + } }); // constructor with no options interface MockStateType { - orders: Array<{ name: string }>; + orders: Array<{ name: string }>; } -const sagaTester = new SagaTester({ initialState: { orders: [] }}); + +const sagaTester = new SagaTester({initialState: {orders: []}}); // start function* fakeSaga() { - return 23; + return 23; +} + +function* fakeSagaWithParams(param1: string, param2: number) { + return param1.length > param2 } sagaTester.start(fakeSaga); +sagaTester.start(fakeSagaWithParams, 'foo', 3); // dispatch -sagaTester.dispatch({ type: 'LOAD_ORDERS', orders: [] }); +sagaTester.dispatch({type: 'LOAD_ORDERS', orders: []}); // updateState -sagaTester.updateState({ orders: [] }); +sagaTester.updateState({orders: []}); // getState sagaTester.getState().orders; // waitFor -sagaTester.waitFor('LOAD_ORDERS').then(() => {}); -sagaTester.waitFor('LOAD_ORDERS', true).then(() => {}); +sagaTester.waitFor('LOAD_ORDERS').then(() => { +}); +sagaTester.waitFor('LOAD_ORDERS', true).then(() => { +}); // wasCalled -sagaTester.wasCalled("LOAD_ORDERS"); +sagaTester.wasCalled('LOAD_ORDERS'); // numCalled -sagaTester.numCalled("LOAD_ORDERS") === 1; +sagaTester.numCalled('LOAD_ORDERS') === 1; // getLatestCalledAction sagaTester.getLatestCalledAction().type; @@ -68,3 +85,8 @@ sagaTester.getCalledActions()[0].type; // getCalledActions sagaTester.reset(); sagaTester.reset(true); + +// getState +const state = sagaTester.getState(); +state.orders.length; +state.orders[0].name; From 8d5940c36bdd76ba364fa79271aff55cc8e0fc48 Mon Sep 17 00:00:00 2001 From: Law Smith Date: Thu, 29 Nov 2018 17:50:40 -0800 Subject: [PATCH 1002/1121] Fixing linter errors. --- types/redux-saga-tester/index.d.ts | 4 ++-- types/redux-saga-tester/redux-saga-tester-tests.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/redux-saga-tester/index.d.ts b/types/redux-saga-tester/index.d.ts index 5778edf1bd..d7772626ef 100644 --- a/types/redux-saga-tester/index.d.ts +++ b/types/redux-saga-tester/index.d.ts @@ -4,8 +4,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 -import {Task} from 'redux-saga'; -import {AnyAction, Middleware, Reducer, ReducersMapObject} from 'redux'; +import { Task } from 'redux-saga'; +import { AnyAction, Middleware, Reducer, ReducersMapObject } from 'redux'; export type SagaFunction = (...args: any[]) => any; diff --git a/types/redux-saga-tester/redux-saga-tester-tests.ts b/types/redux-saga-tester/redux-saga-tester-tests.ts index 4cd9c001c9..48eb490d0a 100644 --- a/types/redux-saga-tester/redux-saga-tester-tests.ts +++ b/types/redux-saga-tester/redux-saga-tester-tests.ts @@ -49,7 +49,7 @@ function* fakeSaga() { } function* fakeSagaWithParams(param1: string, param2: number) { - return param1.length > param2 + return param1.length > param2; } sagaTester.start(fakeSaga); From 5610636ad2e5dbf618f1ed8db8acb4d0407305a6 Mon Sep 17 00:00:00 2001 From: Matt McCutchen Date: Fri, 30 Nov 2018 01:24:18 -0500 Subject: [PATCH 1003/1121] react: Improve type checking of component static properties. (#30730) - Copy properties from ComponentClass to the Component class. - Recommend the react-typescript-helpers package for checking the defaultProps and propTypes at a component definition. - As a fallback, have JSX.LibraryManagedAttributes check the defaultProps and propTypes every time a component is used. - Fix test failures in dependent packages. Fixes #28515. Fixes #16967. --- .../components/responsive.d.ts | 30 --- types/react-select/lib/components/Menu.d.ts | 6 - .../test/examples/CustomNoOptionsMessage.tsx | 7 +- types/react-virtualized/dist/es/List.d.ts | 2 +- types/react-virtualized/dist/es/Table.d.ts | 79 +------ types/react/index.d.ts | 126 ++++++++--- types/react/test/managedAttributes.tsx | 208 ++++++++++-------- types/theming/index.d.ts | 2 +- 8 files changed, 225 insertions(+), 235 deletions(-) diff --git a/types/react-foundation/components/responsive.d.ts b/types/react-foundation/components/responsive.d.ts index 94a915f2c8..9b3a8361ed 100644 --- a/types/react-foundation/components/responsive.d.ts +++ b/types/react-foundation/components/responsive.d.ts @@ -24,36 +24,6 @@ export declare class ResponsiveNavigation extends Component; - alignX: PropTypes.Requireable; - alignY: PropTypes.Requireable; - selfAlignX: PropTypes.Requireable; - selfAlignY: PropTypes.Requireable; - centerAlign: PropTypes.Requireable; - flexContainer: PropTypes.Requireable; - flexDirRow: PropTypes.Requireable; - flexDirRowRev: PropTypes.Requireable; - flexDirCol: PropTypes.Requireable; - flexDirColRev: PropTypes.Requireable; - flexChild: PropTypes.Requireable; - flexOrder: PropTypes.Requireable; - flexOrderSmall: PropTypes.Requireable; - flexOrderMedium: PropTypes.Requireable; - flexOrderLarge: PropTypes.Requireable; - showFor: PropTypes.Requireable; - showOnlyFor: PropTypes.Requireable; - hideFor: PropTypes.Requireable; - hideOnlyFor: PropTypes.Requireable; - isHidden: PropTypes.Requireable; - isInvisible: PropTypes.Requireable; - showForLandscape: PropTypes.Requireable; - showForPortrait: PropTypes.Requireable; - showForSr: PropTypes.Requireable; - showOnFocus: PropTypes.Requireable; - isClearfix: PropTypes.Requireable; - float: PropTypes.Requireable; - }; static defaultProps: { breakpoint: number; }; diff --git a/types/react-select/lib/components/Menu.d.ts b/types/react-select/lib/components/Menu.d.ts index 387b538882..8c6e5fb6c8 100644 --- a/types/react-select/lib/components/Menu.d.ts +++ b/types/react-select/lib/components/Menu.d.ts @@ -67,9 +67,6 @@ export type MenuProps = CommonProps & { export function menuCSS(state: MenuState): React.CSSProperties; export class Menu extends Component, MenuState> { - static contextTypes: { - getPortalPlacement: (state: MenuState) => void, - }; getPlacement: (ref: ElementRef) => void; getState: () => MenuProps & MenuState; } @@ -146,9 +143,6 @@ interface PortalStyleArgs { export function menuPortalCSS(args: PortalStyleArgs): React.CSSProperties; export class MenuPortal extends Component, MenuPortalState> { - static childContextTypes: { - getPortalPlacement: (state: MenuState) => void, - }; getChildContext(): { getPortalPlacement: (state: MenuState) => void; }; diff --git a/types/react-select/test/examples/CustomNoOptionsMessage.tsx b/types/react-select/test/examples/CustomNoOptionsMessage.tsx index 6bea4cb47a..3896272d5b 100644 --- a/types/react-select/test/examples/CustomNoOptionsMessage.tsx +++ b/types/react-select/test/examples/CustomNoOptionsMessage.tsx @@ -18,7 +18,12 @@ const NoOptionsMessage = (props: any) => { export default class CustomNoOptionsMessage extends React.Component { render() { return ( - ({ ...base, ...msgStyles }) }} diff --git a/types/react-virtualized/dist/es/List.d.ts b/types/react-virtualized/dist/es/List.d.ts index 9de78e4066..57e00ae909 100644 --- a/types/react-virtualized/dist/es/List.d.ts +++ b/types/react-virtualized/dist/es/List.d.ts @@ -30,7 +30,7 @@ export type ListProps = GridCoreProps & { /** Height constraint for list (determines how many actual rows are rendered) */ height: number; /** Optional renderer to be used in place of rows when rowCount is 0 */ - noRowsRenderer?: () => JSX.Element | null; + noRowsRenderer?: () => JSX.Element; /** * Callback invoked with information about the slice of rows that were just rendered. * ({ startIndex, stopIndex }): void diff --git a/types/react-virtualized/dist/es/Table.d.ts b/types/react-virtualized/dist/es/Table.d.ts index e9a09dae4c..b66fac389b 100644 --- a/types/react-virtualized/dist/es/Table.d.ts +++ b/types/react-virtualized/dist/es/Table.d.ts @@ -152,6 +152,26 @@ export type ColumnProps = { width: number; }; export class Column extends Component { + static propTypes: { + "aria-label": Requireable; + cellDataGetter: Requireable; + cellRenderer: Requireable; + className: Requireable; + columnData: Requireable; + dataKey: Validator; + disableSort: Requireable; + flexGrow: Requireable; + flexShrink: Requireable; + headerClassName: Requireable; + headerRenderer: Validator; + label: Requireable; + maxWidth: Requireable; + minWidth: Requireable; + style: Requireable; + width: Validator; + id: Requireable; + }; + static defaultProps: { cellDataGetter: TableCellDataGetter; cellRenderer: TableCellRenderer; @@ -358,6 +378,63 @@ export const SortIndicator: React.StatelessComponent<{ * This component expects explicit width, height, and padding parameters. */ export class Table extends PureComponent { + static propTypes: { + "aria-label": Requireable; + autoHeight: Requireable; + children: Validator; + className: Requireable; + disableHeader: Requireable; + estimatedRowSize: Validator; + gridClassName: Requireable; + gridStyle: Requireable; + headerClassName: Requireable; + headerHeight: Validator; + headerRowRenderer: Requireable; + headerStyle: Requireable; + height: Validator; + id: Requireable; + noRowsRenderer: Requireable<() => JSX.Element>; + onHeaderClick: Requireable< + (params: HeaderMouseEventHandlerParams) => void + >; + onRowClick: Requireable<(params: RowMouseEventHandlerParams) => void>; + onRowDoubleClick: Requireable< + (params: RowMouseEventHandlerParams) => void + >; + onRowMouseOut: Requireable< + (params: RowMouseEventHandlerParams) => void + >; + onRowMouseOver: Requireable< + (params: RowMouseEventHandlerParams) => void + >; + onRowsRendered: Requireable< + (params: RowMouseEventHandlerParams) => void + >; + onScroll: Requireable<(params: ScrollEventData) => void>; + overscanRowCount: Validator; + rowClassName: Requireable string)>; + rowGetter: Validator<(params: Index) => any>; + rowHeight: Validator number)>; + rowCount: Validator; + rowRenderer: Requireable<(props: TableRowProps) => React.ReactNode>; + rowStyle: Validator< + React.CSSProperties | ((params: Index) => React.CSSProperties) + >; + scrollToAlignment: Validator; + scrollToIndex: Validator; + scrollTop: Requireable; + sort: Requireable< + ( + params: { sortBy: string; sortDirection: SortDirectionType } + ) => void + >; + sortBy: Requireable; + sortDirection: Validator; + style: Requireable; + tabIndex: Requireable; + width: Validator; + }; + static defaultProps: { disableHeader: false; estimatedRowSize: 30; @@ -368,7 +445,7 @@ export class Table extends PureComponent { onScroll: () => null; overscanRowCount: 10; rowRenderer: TableRowRenderer; - headerRowRenderer: TableHeaderRowRenderer; + headerRowRenderer: TableHeaderRenderer; rowStyle: {}; scrollToAlignment: "auto"; scrollToIndex: -1; diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 5cefb7fca2..f525d7838c 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -421,34 +421,6 @@ declare namespace React { refs: { [key: string]: ReactInstance }; - - // Static properties copied from ComponentClass interface. - /** - * The validity of the type of `propTypes` cannot be checked - * automatically at the definition of a component class because the - * required type depends on `P`. We recommend checking it using - * `asPropTypes` from the `react-typescript-helpers` package. If you - * don't do that, then the type will still be checked by - * JSX.LibraryManagedAttributes every time the component is used, - * assuming you use TypeScript 3.0 or newer. - */ - // Note: `propTypes` and `defaultProps` need to be `any` so that a - // component class that does not redeclare them is assignable to - // `ComponentClass

`. - static propTypes?: any; - static contextTypes?: ValidationMap; - static childContextTypes?: ValidationMap; - /** - * The validity of the type of `defaultProps` cannot be checked - * automatically at the definition of a component class because the - * required type depends on `P`. We recommend checking it using - * `asDefaultProps` from the `react-typescript-helpers` package. If you - * don't do that, then the type will still be checked by - * JSX.LibraryManagedAttributes every time the component is used, - * assuming you use TypeScript 3.0 or newer. - */ - static defaultProps?: any; - static displayName?: string; } class PureComponent

extends Component { } @@ -2664,77 +2636,31 @@ declare namespace React { */ componentStack: string; } - - const Invalid_propTypes: unique symbol; - /** - * Dummy interface that is intersected into the props type of a component on - * use to generate an error if the component's `propTypes` static property - * is invalid. In most cases, you can get more information about the - * problem with the `propTypes` by trying to assign the component to a - * variable of type `React.ComponentType

` where `P` is the appropriate - * props type. You can bypass the type checking of `propTypes` by defining - * a static property named `bypassPropTypesTypecheck`. - */ - interface Invalid_propTypes { - [Invalid_propTypes]: never; - } - - const Invalid_defaultProps: unique symbol; - /** - * Dummy interface that is intersected into the props type of a component on - * use to generate an error if the component's `defaultProps` static - * property is invalid. In most cases, you can get more information about - * the problem with the `defaultProps` by trying to assign the component to - * a variable of type `React.ComponentType

` where `P` is the appropriate - * props type. You can bypass the type checking of `defaultProps` by - * defining a static property named `bypassDefaultPropsTypecheck`. - */ - interface Invalid_defaultProps { - [Invalid_defaultProps]: never; - } - - // For a component class, the P passed to JSX.LibraryManagedAttributes is - // based on the `props` property and includes `children` regardless of - // whether the original props type (the `P` type argument to - // React.Component) does. However, it's common for component classes not - // to list `children` in the `propTypes` if the original props type did not - // include `children`. We accommodate that here by making the validator for - // `children` optional. - type ValidationMapWithOptionalChildren

= - ValidationMap>> & - Partial>>>; - - // Explicitly check for excess properties in CheckPropTypes and - // CheckDefaultProps because by the time we get to - // JSX.LibraryManagedAttributes, we have lost the opportunity to do an - // excess properties check on the original object literal. - - type CheckPropTypes = - // This condition attempts to single out `T = any`, which needs to bypass the rest of the check - // because `keyof T` would come out as not extending `keyof P`. - T extends typeof Invalid_propTypes ? {} : - [keyof T, T] extends [keyof P, ValidationMapWithOptionalChildren

] ? {} : Invalid_propTypes; - - type CheckDefaultProps = - D extends typeof Invalid_defaultProps ? {} : - [keyof D, D] extends [keyof P, Partial

] ? {} : Invalid_defaultProps; - - // Any prop that has a default prop becomes optional, but its type is unchanged - // If declared props have indexed properties, ignore default props entirely as keyof gets widened - // Wrap in an outer-level conditional type to allow distribution over props that are unions - type Defaultize = P extends any - ? string extends keyof P ? P : - & Pick> - & Partial>> - : never; - - type ReactManagedAttributes = - (C extends { propTypes: infer T; } - ? (C extends { bypassPropTypesTypecheck: {}; } ? {} : CheckPropTypes) : {}) & - (C extends { defaultProps: infer D; } - ? (C extends { bypassDefaultPropsTypecheck: {}; } ? {} : CheckDefaultProps) & Defaultize : P); } +// Declared props take priority over inferred props +// If declared props have indexed properties, ignore inferred props entirely as keyof gets widened +type MergePropTypes = P & Pick>; + +// Any prop that has a default prop becomes optional, but its type is unchanged +// Undeclared default props are augmented into the resulting allowable attributes +// If declared props have indexed properties, ignore default props entirely as keyof gets widened +// Wrap in an outer-level conditional type to allow distribution over props that are unions +type Defaultize = P extends any + ? string extends keyof P ? P : + & Pick> + & Partial>> + & Partial>> + : never; + +type ReactManagedAttributes = C extends { propTypes: infer T; defaultProps: infer D; } + ? Defaultize>, D> + : C extends { propTypes: infer T; } + ? MergePropTypes> + : C extends { defaultProps: infer D; } + ? Defaultize + : P; + declare global { namespace JSX { // tslint:disable-next-line:no-empty-interface @@ -2749,9 +2675,9 @@ declare global { // let's assume it's reasonable to do a single React.lazy() around a single React.memo() / vice-versa type LibraryManagedAttributes = C extends React.MemoExoticComponent | React.LazyExoticComponent ? T extends React.MemoExoticComponent | React.LazyExoticComponent - ? React.ReactManagedAttributes - : React.ReactManagedAttributes - : React.ReactManagedAttributes; + ? ReactManagedAttributes + : ReactManagedAttributes + : ReactManagedAttributes; // tslint:disable-next-line:no-empty-interface interface IntrinsicAttributes extends React.Attributes { } diff --git a/types/react/test/managedAttributes.tsx b/types/react/test/managedAttributes.tsx index a4213c58b1..1e0e8226d9 100644 --- a/types/react/test/managedAttributes.tsx +++ b/types/react/test/managedAttributes.tsx @@ -1,18 +1,14 @@ interface LeaveMeAloneDtslint { foo: string; } -// Re-enable when we move @types/react to TS 3.0 (except for the tests marked as -// requiring TS >= 3.2) -// -// In the meantime, these tests can be run manually by uncommenting the code -// below and running `dtslint --onlyTestTsNext`. +// // Re-enable when we move @types/react to TS 3.0 // import * as React from 'react'; // import * as PropTypes from 'prop-types'; // interface Props { -// bool?: boolean | null; +// bool?: boolean; // fnc: () => any; // node?: React.ReactNode; -// num?: number | null; +// num?: number; // reqNode: NonNullable; // str: string; // } @@ -22,12 +18,14 @@ interface LeaveMeAloneDtslint { foo: string; } // fnc: PropTypes.func.isRequired, // node: PropTypes.node, // num: PropTypes.number, -// reqNode: PropTypes.node.isRequired, // str: PropTypes.string.isRequired, +// extraStr: PropTypes.string.isRequired, +// extraNum: PropTypes.number // }; // const defaultProps = { // fnc: (() => 'abc') as () => any, +// extraBool: false, // reqNode: 'text_node' as NonNullable // }; @@ -38,12 +36,39 @@ interface LeaveMeAloneDtslint { foo: string; } // const annotatedPropTypesAndDefaultPropsTests = [ // // $ExpectError -// , // str is required -// , +// , // str and extraStr are required +// , // // $ExpectError // , // num type mismatch // } +// num={0} +// reqNode={} +// str='abc' +// /> +// ]; + +// class UnannotatedPropTypesAndDefaultProps extends React.Component { +// static propTypes = propTypes; +// static defaultProps = defaultProps; +// } + +// const unannotatedPropTypesAndDefaultPropsTests = [ +// // $ExpectError +// , // stra and extraStr are required +// , +// // $ExpectError +// , // extraBool type mismatch +// } // num={0} @@ -58,14 +83,16 @@ interface LeaveMeAloneDtslint { foo: string; } // const annotatedPropTypesTests = [ // // $ExpectError -// , // str, reqNode and fnc are required -// } />, +// , // str, extraStr, reqNode and fnc are required +// } />, // // $ExpectError -// } extraBool={false} />, // extraBool doesn't exist +// } extraBool={false} />, // extraBool doesn't exist // // $ExpectError -// } num='abc' />, // num type mismatch +// } num='abc' />, // num type mismatch // } // num={0} @@ -74,6 +101,29 @@ interface LeaveMeAloneDtslint { foo: string; } // /> // ]; +// class UnannotatedPropTypes extends React.Component { +// static propTypes = propTypes; +// } + +// const unannotatedPropTypesTests = [ +// // $ExpectError +// , // str, extraStr and fnc are required +// , +// // $ExpectError +// } />, // reqNode doesn't exist +// // $ExpectError +// } num='abc' />, // num type mismatch +// } +// num={0} +// str='abc' +// /> +// ]; + // class AnnotatedDefaultProps extends React.Component { // static defaultProps = defaultProps; // } @@ -87,6 +137,7 @@ interface LeaveMeAloneDtslint { foo: string; } // { }} />, // str type mismatch // // ]; +// class UnannotatedDefaultProps extends React.Component { +// static defaultProps = defaultProps; +// } + +// const unannotatedDefaultPropsTests = [ +// , +// } +// /> +// ]; + // class ComponentWithNoDefaultProps extends React.Component {} -// function FunctionalComponent(props: Props) { return <>{props.reqNode}; } +// function FunctionalComponent(props: Props) { return <>{props.reqNode} } // FunctionalComponent.defaultProps = defaultProps; // const functionalComponentTests = [ // // $ExpectError // , -// // NOTE: This test requires TypeScript >= 3.2, which honors JSX.LibraryManagedAttributes for function components. +// // This is possibly a bug/limitation of TS +// // Even if JSX.LibraryManagedAttributes returns the correct type, it doesn't seem to work with non-classes +// // This also doesn't work with things typed React.SFC

because defaultProps will always be Partial

+// // $ExpectError // // ]; @@ -115,28 +182,27 @@ interface LeaveMeAloneDtslint { foo: string; } // const memoTests = [ // // $ExpectError // , -// // Requires TypeScript >= 3.2; see comment re FunctionalComponent above +// // $ExpectError won't work as long as FunctionalComponent doesn't work either // , // // $ExpectError // , // , -// // Requires TypeScript >= 3.2; see comment re FunctionalComponent above +// // $ExpectError this doesn't work despite JSX.LibraryManagedAttributes returning the correct type // , -// // Requires TypeScript >= 3.2; see comment re FunctionalComponent above +// // $ExpectError won't work as long as FunctionalComponent doesn't work either // , // // $ExpectError // , -// // Requires TypeScript >= 3.2; see comment re FunctionalComponent above +// // $ExpectError this doesn't work despite JSX.LibraryManagedAttributes returning the correct type // // ]; -// // $ExpectType Pick & Partial> // type AnnotatedDefaultPropsLibraryManagedAttributes = JSX.LibraryManagedAttributes; -// // $ExpectType Pick & Partial> +// // $ExpectType AnnotatedDefaultPropsLibraryManagedAttributes // type FunctionalComponentLibraryManagedAttributes = JSX.LibraryManagedAttributes; -// // $ExpectType Pick & Partial> +// // $ExpectType FunctionalComponentLibraryManagedAttributes // type MemoFunctionalComponentLibraryManagedAttributes = JSX.LibraryManagedAttributes; -// // $ExpectType Pick & Partial> +// // $ExpectType FunctionalComponentLibraryManagedAttributes // type LazyMemoFunctionalComponentLibraryManagedAttributes = JSX.LibraryManagedAttributes; // const ForwardRef = React.forwardRef((props: Props, ref: React.Ref) => ( @@ -152,97 +218,7 @@ interface LeaveMeAloneDtslint { foo: string; } // reqNode={} // str='' // />, -// // the type of ForwardRef.defaultProps stays Partial

anyway even if assigned -// // $ExpectError +// // same bug as MemoFunctionalComponent and React.SFC-typed things +// // $ExpectError the type of ForwardRef.defaultProps stays Partial

anyway even if assigned // // ]; - -// const wrongDefaultProps = { -// fnc: 42 -// }; -// class WrongDefaultPropsComponent extends React.Component { -// static defaultProps = wrongDefaultProps; -// } -// const wrongDefaultPropsComponentTests = [ -// // $ExpectError -// undefined} reqNode="text" str="str" /> -// ]; -// // $ExpectError -// const investigateWrongDefaultPropsComponent: React.ComponentType = WrongDefaultPropsComponent; - -// const excessDefaultProps = { -// another: 43 -// }; -// class ExcessDefaultPropsComponent extends React.Component { -// static defaultProps = excessDefaultProps; -// } -// const excessDefaultPropsComponentTests = [ -// // $ExpectError -// undefined} reqNode="text" str="str" /> -// ]; -// // $ExpectError -// const investigateExcessDefaultPropsComponent: React.ComponentType = ExcessDefaultPropsComponent; - -// const wrongPropTypes = { -// bool: PropTypes.bool, -// fnc: PropTypes.number.isRequired, -// node: PropTypes.node, -// num: PropTypes.number, -// reqNode: PropTypes.node.isRequired, -// str: PropTypes.string.isRequired, -// }; -// class WrongPropTypesComponent extends React.Component { -// static propTypes = wrongPropTypes; -// } -// const wrongPropTypesComponentTests = [ -// // $ExpectError -// undefined} reqNode="text" str="str" /> -// ]; - -// const incompletePropTypes = { -// bool: PropTypes.bool, -// node: PropTypes.node, -// num: PropTypes.number, -// reqNode: PropTypes.node.isRequired, -// str: PropTypes.string.isRequired, -// }; -// class IncompletePropTypesComponent extends React.Component { -// static propTypes = incompletePropTypes; -// } -// const incompletePropTypesComponentTests = [ -// // $ExpectError -// undefined} reqNode="text" str="str" /> -// ]; - -// const excessPropTypes = { -// another: PropTypes.number.isRequired, -// bool: PropTypes.bool, -// fnc: PropTypes.func.isRequired, -// node: PropTypes.node, -// num: PropTypes.number, -// reqNode: PropTypes.node.isRequired, -// str: PropTypes.string.isRequired, -// }; -// class ExcessPropTypesComponent extends React.Component { -// static propTypes = excessPropTypes; -// } -// const ExcessPropTypesComponentTests = [ -// // $ExpectError -// undefined} reqNode="text" str="str" /> -// ]; - -// class WrongDefaultPropsSuppressedComponent extends React.Component { -// static defaultProps = wrongDefaultProps; -// static bypassDefaultPropsTypecheck = true; -// } -// const wrongDefaultPropsSuppressedComponentTests = [ -// undefined} reqNode="text" str="str" /> -// ]; - -// class WrongPropTypesSuppressedComponent extends React.Component { -// static propTypes = wrongPropTypes; -// static bypassPropTypesTypecheck = true; -// } -// const wrongPropTypesSuppressedComponentTests = [ -// undefined} reqNode="text" str="str" /> -// ]; diff --git a/types/theming/index.d.ts b/types/theming/index.d.ts index d2c0d1ee40..e2525b3ce6 100644 --- a/types/theming/index.d.ts +++ b/types/theming/index.d.ts @@ -40,7 +40,7 @@ export interface ThemeListener { callback: (theme: Theme) => void ): SubscriptionId; unsubscribe(context: ContextWithTheme, id: SubscriptionId): void; - contextTypes: React.ValidationMap>; + contextTypes: React.ValidationMap; } /** * ThemeListener for the default channel From 1916f716dc67551c639b323a14064c7b9f74562e Mon Sep 17 00:00:00 2001 From: Wayne Carson Date: Fri, 30 Nov 2018 15:41:13 -0800 Subject: [PATCH 1020/1121] Added flush() method to debounce (see https://git.io/fpoYM) --- types/debounce/debounce-tests.ts | 3 +++ types/debounce/index.d.ts | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/debounce/debounce-tests.ts b/types/debounce/debounce-tests.ts index 4acff7c446..5f0463a4c1 100644 --- a/types/debounce/debounce-tests.ts +++ b/types/debounce/debounce-tests.ts @@ -14,6 +14,9 @@ const imm1: number = (debounce((x: number) => x * 2, 100, true))(2); const clearable = debounce(doThings); clearable.clear(); +const flushable = debounce(doThings); +flushable.flush(); + // Intentionally asserts that the member variable has all the same benefits as the direct export. // Eventually, if debounce stop supporting the CommonJS-only module calling (`require("debounce")(...)`), // we can remove this and change the top import&require to `import { debounce } from "debounce";`. diff --git a/types/debounce/index.d.ts b/types/debounce/index.d.ts index fa244351d6..bef99f2c86 100644 --- a/types/debounce/index.d.ts +++ b/types/debounce/index.d.ts @@ -1,13 +1,15 @@ -// Type definitions for debounce 3.0 +// Type definitions for debounce 1.2.0 // Project: https://github.com/component/debounce // Definitions by: Denis Sokolov // Josh Goldberg +// Wayne Carson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace _debounce { const debounce: typeof _debounce; } -declare function _debounce(f: A, interval?: number, immediate?: boolean): A & { clear(): void; }; +declare function _debounce(f: A, interval?: number, immediate?: boolean): A & { clear(): void; } + & { flush(): void }; export = _debounce; From 6645ba33d52edd3303ae58bf81ce6b29042bd924 Mon Sep 17 00:00:00 2001 From: Wayne Carson Date: Fri, 30 Nov 2018 16:12:54 -0800 Subject: [PATCH 1021/1121] Fixed DT header version convention issue. --- types/debounce/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/debounce/index.d.ts b/types/debounce/index.d.ts index bef99f2c86..e561cb51fe 100644 --- a/types/debounce/index.d.ts +++ b/types/debounce/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for debounce 1.2.0 +// Type definitions for debounce 1.2 // Project: https://github.com/component/debounce // Definitions by: Denis Sokolov // Josh Goldberg From f86366a401ca98ebaa7aa3ec4a0ef5391970eee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 02:44:09 +0100 Subject: [PATCH 1022/1121] Prefer notation without arrow function --- types/puppeteer/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 202cc05181..813f256835 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -2061,10 +2061,10 @@ export interface ConnectOptions { } export interface ConnectionTransport { - send: (message: string) => void; - close: () => void; - onmessage?: (message: string) => void; - onclose?: () => void; + send(message: string): void; + close(): void; + onmessage?(message: string): void; + onclose?(): void; } export interface CDPSession extends EventEmitter { From 0a82ed88126e5b99a876aa5514ce2beedb9f441a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 02:45:40 +0100 Subject: [PATCH 1023/1121] Remove empty line --- types/puppeteer/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 813f256835..fe4fb0d14a 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -2033,7 +2033,6 @@ export interface BrowserOptions { */ isMobile?: boolean; /** - * * Specifies if viewport supports touch events. * @default false */ From b506cfa9c04bbeff9866b50a0712808b45ea171b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 03:01:35 +0100 Subject: [PATCH 1024/1121] Define type for layout dimension --- types/puppeteer/index.d.ts | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index fe4fb0d14a..1b675b20c5 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -513,6 +513,9 @@ export interface DirectNavigationOptions extends NavigationOptions { referer?: string; } +/** Accepts values labeled with units. If number, treat as pixels. */ +export type LayoutDimension = string | number; + export type PDFFormat = | "Letter" | "Legal" @@ -580,22 +583,21 @@ export interface PDFOptions { * @default 'Letter' */ format?: PDFFormat; - /** Paper width, accepts values labeled with units. Treat numbers as pixel values */ - width?: string | number; - /** Paper height, accepts values labeled with units. Treat numbers as pixel values */ - height?: string | number; - /** Paper margins, defaults to none. */ + /** Paper width. */ + width?: LayoutDimension; + /** Paper height. */ + height?: LayoutDimension; + /** Paper margins, defaults to none. */ margin?: { - /** Top margin, accepts values labeled with units. Treat numbers as pixel values */ - top?: string | number; - /** Right margin, accepts values labeled with units. Treat numbers as pixel values */ - right?: string | number; - /** Bottom margin, accepts values labeled with units. Treat numbers as pixel values */ - bottom?: string | number; - /** Left margin, accepts values labeled with units. Treat numbers as pixel values */ - left?: string | number; + /** Top margin. */ + top?: LayoutDimension; + /** Right margin. */ + right?: LayoutDimension; + /** Bottom margin. */ + bottom?: LayoutDimension; + /** Left margin. */ + left?: LayoutDimension; }; - /** * Give any CSS @page size declared in the page priority over what is declared in width and * height or format options. From 8775d384e1fccf160bc9727d076ffdc23ae53c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Den=C3=A8le?= Date: Sat, 1 Dec 2018 03:17:17 +0100 Subject: [PATCH 1025/1121] Extends interfaces for ConnectOptions & LaunchOptions --- types/puppeteer/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index 1b675b20c5..e48e29b7ec 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -1937,7 +1937,7 @@ export interface Target { url(): string; } -export interface LaunchOptions extends Timeoutable { +export interface LaunchOptions extends ChromeArgOptions, BrowserOptions, Timeoutable { /** * Path to a Chromium executable to run instead of bundled Chromium. If * executablePath is a relative path, then it is resolved relative to current @@ -2052,7 +2052,7 @@ export interface BrowserOptions { slowMo?: number; } -export interface ConnectOptions { +export interface ConnectOptions extends BrowserOptions { /** A browser websocket endpoint to connect to. */ browserWSEndpoint?: string; /** @@ -2108,10 +2108,10 @@ export interface CoverageEntry { } /** Attaches Puppeteer to an existing Chromium instance */ -export function connect(options?: ConnectOptions & BrowserOptions): Promise; +export function connect(options?: ConnectOptions): Promise; /** The default flags that Chromium will be launched with */ export function defaultArgs(options?: ChromeArgOptions): string[]; /** Path where Puppeteer expects to find bundled Chromium */ export function executablePath(): string; /** The method launches a browser instance with given arguments. The browser will be closed when the parent node.js process is closed. */ -export function launch(options?: LaunchOptions & ChromeArgOptions & BrowserOptions): Promise; +export function launch(options?: LaunchOptions): Promise; From 0c94f13161257397f488f2943b15e3e945cec0a1 Mon Sep 17 00:00:00 2001 From: Levin Keller Date: Thu, 29 Nov 2018 20:21:55 +0100 Subject: [PATCH 1026/1121] Correctly type callback --- types/web3/providers.d.ts | 10 ++++++---- types/web3/web3-tests.ts | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/types/web3/providers.d.ts b/types/web3/providers.d.ts index 729ea09278..22a883222f 100644 --- a/types/web3/providers.d.ts +++ b/types/web3/providers.d.ts @@ -12,11 +12,13 @@ interface JsonRPCResponse { error?: string; } +interface Callback { + (error: Error): void; + (error: null, val: ResultType): void; +} + export class Provider { - send( - payload: JsonRPCRequest, - callback: (e: Error, val: JsonRPCResponse) => void - ): any; + send(payload: JsonRPCRequest, callback: Callback): any; } export class WebsocketProvider extends Provider { diff --git a/types/web3/web3-tests.ts b/types/web3/web3-tests.ts index 170a8b22c3..1d7474465e 100644 --- a/types/web3/web3-tests.ts +++ b/types/web3/web3-tests.ts @@ -2,6 +2,7 @@ import Web3 = require("web3"); import BigNumber = require("bn.js"); import { TransactionReceipt } from "web3/types"; import PromiEvent from "web3/promiEvent"; +import { Provider, JsonRPCResponse } from "web3/providers"; const contractAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"; @@ -10,6 +11,25 @@ const contractAddress = "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"; // -------------------------------------------------------------------------- const web3 = new Web3(); const myProvider = new web3.providers.HttpProvider("http://localhost:5454"); + +const createFailingHttpProvider = (): Provider => ({ + send(payload, callback) { + callback(new Error("Illegal!")); + } +}); + +const createSuccesfulHttpProvider = (): Provider => ({ + send(payload, callback) { + const response = {}; + callback(null, response as JsonRPCResponse); + } +}); + +const fakeProvider: Provider = createFailingHttpProvider(); +const otherFakeProvider: Provider = createSuccesfulHttpProvider(); + +web3.setProvider(fakeProvider); +web3.setProvider(otherFakeProvider); web3.setProvider(myProvider); web3.eth.setProvider(myProvider); From c679a8e691db619614c4acb666b768ef2f1508d2 Mon Sep 17 00:00:00 2001 From: Ivo Murrell Date: Sat, 1 Dec 2018 02:32:31 +0000 Subject: [PATCH 1027/1121] Add type definitions for cfn-response package. --- types/cfn-response/cfn-response-tests.ts | 12 ++++++++++++ types/cfn-response/index.d.ts | 19 +++++++++++++++++++ types/cfn-response/tsconfig.json | 23 +++++++++++++++++++++++ types/cfn-response/tslint.json | 1 + 4 files changed, 55 insertions(+) create mode 100644 types/cfn-response/cfn-response-tests.ts create mode 100644 types/cfn-response/index.d.ts create mode 100644 types/cfn-response/tsconfig.json create mode 100644 types/cfn-response/tslint.json diff --git a/types/cfn-response/cfn-response-tests.ts b/types/cfn-response/cfn-response-tests.ts new file mode 100644 index 0000000000..b9633c17aa --- /dev/null +++ b/types/cfn-response/cfn-response-tests.ts @@ -0,0 +1,12 @@ +import * as cfn from "cfn-response"; +import { CloudFormationCustomResourceEvent, Context } from "aws-lambda"; + +declare const event: CloudFormationCustomResourceEvent; +declare const context: Context; + +// $ExpectType void +cfn.send(event, context, cfn.SUCCESS, { sample: 123 }, "abc"); +// $ExpectType void +cfn.send(event, context, "SUCCESS"); +// $ExpectError +cfn.send(event, context, "", {}); diff --git a/types/cfn-response/index.d.ts b/types/cfn-response/index.d.ts new file mode 100644 index 0000000000..54cb63dfef --- /dev/null +++ b/types/cfn-response/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for cfn-response 1.0 +// Project: https://github.com/LukeMizuhashi/cfn-response +// Definitions by: Ivo Murrell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { CloudFormationCustomResourceEvent, Context } from "aws-lambda"; + +export type ResponseStatus = "SUCCESS" | "FAILED"; +export const SUCCESS: ResponseStatus; +export const FAILED: ResponseStatus; + +export function send( + event: CloudFormationCustomResourceEvent, + context: Context, + responseStatus: ResponseStatus, + responseData?: object, + physicalResourceId?: string +): void; diff --git a/types/cfn-response/tsconfig.json b/types/cfn-response/tsconfig.json new file mode 100644 index 0000000000..0aff9f9071 --- /dev/null +++ b/types/cfn-response/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cfn-response-tests.ts" + ] +} diff --git a/types/cfn-response/tslint.json b/types/cfn-response/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cfn-response/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From c92112c5e79c70f4f4c0b08e4da5077e3e58c916 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 15:09:22 +0100 Subject: [PATCH 1028/1121] Split sequence declaration --- types/rosie/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index e66e9855eb..b8c52d3bc0 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -163,7 +163,8 @@ declare namespace rosie { * @param {function(number): *=} builder * @return {Factory} */ - sequence(name: keyof T, dependenciesOrBuilder?: (i: number) => any | keyof T[], builder?: Function) : IFactory; + sequence(name: K, builder?: (i: number) => any): IFactory; + sequence(name: keyof T, dependencies: D[], builder: (i: number, ...args: any[]) => any): IFactory; /** * Sets a post-processor callback that will receive built objects and the From 2b8c538ab791543e1c1661dc0700a637f4514bb9 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 15:10:57 +0100 Subject: [PATCH 1029/1121] Unregistered factories --- types/rosie/index.d.ts | 1 + types/rosie/rosie-tests.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index b8c52d3bc0..ad7d8f644d 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -8,6 +8,7 @@ declare namespace rosie { interface IFactoryStatic { + new(): IFactory; /** * Defines a factory by name and constructor function. Call #attr and #option * on the result to define the properties of this factory. diff --git a/types/rosie/rosie-tests.ts b/types/rosie/rosie-tests.ts index 86dd049732..bb6b9defb8 100644 --- a/types/rosie/rosie-tests.ts +++ b/types/rosie/rosie-tests.ts @@ -70,6 +70,21 @@ const person = Factory.build('Person'); let aString = ''; aString = person.firstName; +// Unregistered factories +const unregisteredPersonFactory = new Factory(); + +unregisteredPersonFactory.attr('firstName', 'John').sequence('id'); + +// Sequence with dependencies +unregisteredPersonFactory.sequence('lastName', ['age'], (i: number, age: number) => `Doe ${i} ${age}`) + +// Unregistered extended factories + +const unregisteredExtendedPersonFactory = new Factory().extend(unregisteredPersonFactory) + +unregisteredExtendedPersonFactory.attr('firstName', 'John2') +unregisteredExtendedPersonFactory.sequence('lastName', ['age'], (i: number) => `Doe2 ${i}`) + class CustomClass { type: string; From 1bd81e2845069ea2a1696fc367041dec9bb30eb3 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 15:11:19 +0100 Subject: [PATCH 1030/1121] Add author info --- types/rosie/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/rosie/index.d.ts b/types/rosie/index.d.ts index ad7d8f644d..63624ad3f2 100644 --- a/types/rosie/index.d.ts +++ b/types/rosie/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Abner Oliveira , // Chris Grigg , // Alex Bukurov +// Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From d2260f4ff382e9128a876325fc22df9b80611443 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:33:29 -0300 Subject: [PATCH 1031/1121] fix: mdast version --- types/mdast/index.d.ts | 2 +- types/unist/index.d.ts | 4 +--- types/unist/unist-tests.ts | 14 ++++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/types/mdast/index.d.ts b/types/mdast/index.d.ts index d7761bd38f..c1fcadec97 100644 --- a/types/mdast/index.d.ts +++ b/types/mdast/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/syntax-tree/mdast // Definitions by: Jun Lu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 +// TypeScript Version: 3.0 import { Parent as UnistParent, Literal as UnistLiteral, Node } from 'unist'; diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 55bea58e47..121362a2ac 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -7,8 +7,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 -export as namespace Unist - // Syntactic units in unist syntax trees are called nodes. export interface Node { // The variant of a node. @@ -59,5 +57,5 @@ export interface Parent extends Node { // Nodes containing a value. export interface Literal extends Node { - value: any; + value: unknown; } diff --git a/types/unist/unist-tests.ts b/types/unist/unist-tests.ts index 9ba2dc06d5..6f10111ba0 100644 --- a/types/unist/unist-tests.ts +++ b/types/unist/unist-tests.ts @@ -1,4 +1,6 @@ -const data: Unist.Data = { +import {Data, Point, Position, Node, Literal, Parent} from './index'; + +const data: Data = { string: 'string', number: 1, object: { @@ -9,32 +11,32 @@ const data: Unist.Data = { null: null }; -const point: Unist.Point = { +const point: Point = { line: 1, column: 1, offset: 0 }; -const position: Unist.Position = { +const position: Position = { start: point, end: point, indent: [1] }; -const node: Unist.Node = { +const node: Node = { type: 'node', data, position }; -const text: Unist.Literal = { +const text: Literal = { type: 'text', data, position, value: 'value' }; -const parent: Unist.Parent = { +const parent: Parent = { type: 'parent', data, position, From 982ed47c5cf0bcea51727e8137b717a536dce726 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:36:35 -0300 Subject: [PATCH 1032/1121] fix: linting problems --- types/unist/unist-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/unist-tests.ts b/types/unist/unist-tests.ts index 6f10111ba0..1c27db2a58 100644 --- a/types/unist/unist-tests.ts +++ b/types/unist/unist-tests.ts @@ -1,4 +1,4 @@ -import {Data, Point, Position, Node, Literal, Parent} from './index'; +import { Data, Point, Position, Node, Literal, Parent } from 'unist'; const data: Data = { string: 'string', From b3d6ad95f869a0ba8fadc6b6676b6f05c545699f Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Sat, 1 Dec 2018 15:48:04 +0100 Subject: [PATCH 1033/1121] [hibp] add typings --- types/hibp/hibp-tests.ts | 17 +++++++ types/hibp/index.d.ts | 97 ++++++++++++++++++++++++++++++++++++++++ types/hibp/tsconfig.json | 23 ++++++++++ types/hibp/tslint.json | 1 + 4 files changed, 138 insertions(+) create mode 100644 types/hibp/hibp-tests.ts create mode 100644 types/hibp/index.d.ts create mode 100644 types/hibp/tsconfig.json create mode 100644 types/hibp/tslint.json diff --git a/types/hibp/hibp-tests.ts b/types/hibp/hibp-tests.ts new file mode 100644 index 0000000000..cdcd1851bf --- /dev/null +++ b/types/hibp/hibp-tests.ts @@ -0,0 +1,17 @@ +import * as hibp from 'hibp'; + +hibp +.search('someAccountOrEmail') +.then(data => { + if (data.breaches || data.pastes) { + // Bummer... + console.log(data); + } else { + // Phew! We're clear. + console.log('Good news — no pwnage found!'); + } +}) +.catch(err => { + // Something went wrong. + console.log(err.message); +}); diff --git a/types/hibp/index.d.ts b/types/hibp/index.d.ts new file mode 100644 index 0000000000..27819f1c96 --- /dev/null +++ b/types/hibp/index.d.ts @@ -0,0 +1,97 @@ +// Type definitions for hibp 7.2 +// Project: https://github.com/wkovacs64/hibp +// Definitions by: Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export interface BreachOptions { + domain?: string; + truncate?: boolean; +} + +export interface Breach { + Name: string; + Title: string; + Domain: string; + BreachDate: string; + AddedDate: string; + ModifiedDate: string; + PwnCount: number; + Description: string; + LogoPath: string; + DataClasses: string[]; + IsVerified: boolean; + IsFabricated: boolean; + IsSensitive: boolean; + IsRetired: boolean; + IsSpamList: boolean; +} + +export interface Paste { + Id: string; + Source: string; + Title: string; + Date: string; + EmailCount: number; +} + +export interface Range { + suffix: string; + count: number; +} + +/** + * Fetches data for a specific breach event. + */ +export function breach(breachName: string): Promise; + +/** + * Fetches breach data for a specific account. + */ +export function breachedAccount(account: string, options?: BreachOptions): Promise; + +/** + * Fetches all breach events in the system. + */ +export function breaches(options?: { domain?: string }): Promise; + +/** + * Fetches all data classes in the system. + */ +export function dataClasses(): Promise; + +/** + * Fetches paste data for a specific email address. + */ +export function pasteAccount(email: string): Promise; + +/** + * Fetches the number of times the the given password has been exposed in a breach (0 indicating no exposure). + * The password is given in plain text, but only the first 5 characters of its SHA-1 hash will be submitted to the API. + */ +export function pwnedPassword(password: string): Promise; + +/** + * Fetches the SHA-1 hash suffixes for the given 5-character SHA-1 hash prefix. + * + * When a password hash with the same first 5 characters is found in the Pwned Passwords repository, + * the API will respond with an HTTP 200 and include the suffix of every hash beginning with the specified prefix, + * followed by a count of how many times it appears in the data set. + * + * This function parses the response and returns a more structured format. + */ +export function pwnedPasswordRange(prefix: string): Promise; + +/** + * Fetches all breaches and all pastes associated with the provided account (email address or username). + * + * Note that the remote API does not support querying pastes by username (only email addresses), + * so in the event the provided account is not a valid email address, + * only breach data is queried and the "pastes" field of the resulting object will always be null. + * + * This is exactly how searching via the current web interface behaves, which this convenience method is designed to mimic. + * + */ +export function search(account: string, options?: BreachOptions): Promise<{ breaches?: Breach[], pastes?: Paste[] }>; diff --git a/types/hibp/tsconfig.json b/types/hibp/tsconfig.json new file mode 100644 index 0000000000..58ecb92a11 --- /dev/null +++ b/types/hibp/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hibp-tests.ts" + ] +} diff --git a/types/hibp/tslint.json b/types/hibp/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hibp/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 8b0dd4b73160fd8d77cc9dcd7e227159588c5552 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:54:46 -0300 Subject: [PATCH 1034/1121] fix: remove mandatory indent property --- types/unist/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 121362a2ac..202b315250 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -34,7 +34,7 @@ export interface Position { // Start column at each index (plus start line) in the source region, // for elements that span multiple lines. - indent: number[]; + indent?: number[]; } // One place in a source file. From 0084184b14ff5aaeb264188421e51f5af205e779 Mon Sep 17 00:00:00 2001 From: Hernan Rajchert Date: Sat, 1 Dec 2018 11:58:20 -0300 Subject: [PATCH 1035/1121] refactor: converted comments in multi-line to see them in the IDE --- types/unist/index.d.ts | 70 +++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/types/unist/index.d.ts b/types/unist/index.d.ts index 202b315250..023b1c11e3 100644 --- a/types/unist/index.d.ts +++ b/types/unist/index.d.ts @@ -7,55 +7,89 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.0 -// Syntactic units in unist syntax trees are called nodes. +/** + * Syntactic units in unist syntax trees are called nodes. + */ export interface Node { - // The variant of a node. + /** + * The variant of a node. + */ type: string; - // Information from the ecosystem. + /** + * Information from the ecosystem. + */ data?: Data; - // Location of a node in a source document. - // Must not be present if a node is generated. + /** + * Location of a node in a source document. + * Must not be present if a node is generated. + */ position?: Position; } +/** + * Information associated by the ecosystem with the node. + * Space is guaranteed to never be specified by unist or specifications + * implementing unist. + */ export interface Data { [key: string]: unknown; } -// Location of a node in a source file. +/** + * Location of a node in a source file. + */ export interface Position { - // Place of the first character of the parsed source region. + /** + * Place of the first character of the parsed source region. + */ start: Point; - // Place of the first character after the parsed source region. + /** + * Place of the first character after the parsed source region. + */ end: Point; - // Start column at each index (plus start line) in the source region, - // for elements that span multiple lines. + /** + * Start column at each index (plus start line) in the source region, + * for elements that span multiple lines. + */ indent?: number[]; } -// One place in a source file. +/** + * One place in a source file. + */ export interface Point { - // Line in a source file (1-indexed integer). + /** + * Line in a source file (1-indexed integer). + */ line: number; - // Column in a source file (1-indexed integer). + /** + * Column in a source file (1-indexed integer). + */ column: number; - - // Character in a source file (0-indexed integer). + /** + * Character in a source file (0-indexed integer). + */ offset?: number; } -// Nodes containing other nodes. +/** + * Nodes containing other nodes. + */ export interface Parent extends Node { - // List representing the children of a node. + /** + * List representing the children of a node. + */ children: Node[]; } -// Nodes containing a value. +/** + * Nodes containing a value. + */ export interface Literal extends Node { value: unknown; } From 2c5d06c3e8368dabfbb5e2a6f6958148857fe0d6 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 16:01:05 +0100 Subject: [PATCH 1036/1121] [@storybook/addon-options] Add withOptions --- types/storybook__addon-options/index.d.ts | 7 +++++++ .../storybook__addon-options-tests.ts | 19 ++++++++++++++++++- types/storybook__addon-options/tsconfig.json | 5 ++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index 61f9f11def..a0baa39ab2 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -6,6 +6,8 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 +import { StoryDecorator } from "@storybook/react"; + export interface Options { name?: string; url?: string; @@ -23,4 +25,9 @@ export interface Options { selectedAddonPanel?: string; } +/** + * @deprecated Use withOptions instead + */ export function setOptions(options: Options): void; + +export function withOptions(options: Options): StoryDecorator; diff --git a/types/storybook__addon-options/storybook__addon-options-tests.ts b/types/storybook__addon-options/storybook__addon-options-tests.ts index a3003c913f..1fc49d18e0 100644 --- a/types/storybook__addon-options/storybook__addon-options-tests.ts +++ b/types/storybook__addon-options/storybook__addon-options-tests.ts @@ -1,4 +1,5 @@ -import { setOptions } from '@storybook/addon-options'; +import { setOptions, withOptions } from '@storybook/addon-options'; +import { addDecorator } from '@storybook/react'; setOptions({ name: 'My Storybook', @@ -31,3 +32,19 @@ setOptions({ hierarchySeparator: '.', hierarchyRootSeparator: '#', }); + +addDecorator( + withOptions({ + name: "My Storybook", + url: "https://example.com", + goFullScreen: false, + showStoriesPanel: false, + showAddonPanel: false, + showSearchBox: false, + addonPanelInRight: false, + sortStoriesByKind: false, + hierarchySeparator: /\//, + hierarchyRootSeparator: /\|/, + selectedAddonPanel: "storybook/actions/action-panel" + }) +); diff --git a/types/storybook__addon-options/tsconfig.json b/types/storybook__addon-options/tsconfig.json index 936a535725..df1a88f769 100644 --- a/types/storybook__addon-options/tsconfig.json +++ b/types/storybook__addon-options/tsconfig.json @@ -15,6 +15,9 @@ "paths": { "@storybook/addon-options": [ "storybook__addon-options" + ], + "@storybook/react": [ + "storybook__react" ] }, "types": [], @@ -25,4 +28,4 @@ "index.d.ts", "storybook__addon-options-tests.ts" ] -} \ No newline at end of file +} From 6e11b5df9d359a15d2851144b130139259f36ae4 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 16:02:18 +0100 Subject: [PATCH 1037/1121] Add author --- types/storybook__addon-options/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index a0baa39ab2..42010b84e4 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Joscha Feth // Simon Helle Nielsen // A.MacLeay +// Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From e66e6ed61f4b7ebe84b84ad46c6cc7f982b0bf72 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Sat, 1 Dec 2018 16:13:44 +0100 Subject: [PATCH 1038/1121] Increase typescript version to match @storybook/react --- types/storybook__addon-options/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/storybook__addon-options/index.d.ts b/types/storybook__addon-options/index.d.ts index 42010b84e4..ec3ba1e252 100644 --- a/types/storybook__addon-options/index.d.ts +++ b/types/storybook__addon-options/index.d.ts @@ -5,7 +5,7 @@ // A.MacLeay // Adam Misiorny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 +// TypeScript Version: 2.8 import { StoryDecorator } from "@storybook/react"; From 21179bbf4603a1a25762715eb1b4a22fccc867a2 Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Sat, 1 Dec 2018 16:31:01 +0100 Subject: [PATCH 1039/1121] [cson-parser] add typings --- types/cson-parser/cson-parser-tests.ts | 5 +++++ types/cson-parser/index.d.ts | 25 +++++++++++++++++++++++++ types/cson-parser/tsconfig.json | 23 +++++++++++++++++++++++ types/cson-parser/tslint.json | 1 + 4 files changed, 54 insertions(+) create mode 100644 types/cson-parser/cson-parser-tests.ts create mode 100644 types/cson-parser/index.d.ts create mode 100644 types/cson-parser/tsconfig.json create mode 100644 types/cson-parser/tslint.json diff --git a/types/cson-parser/cson-parser-tests.ts b/types/cson-parser/cson-parser-tests.ts new file mode 100644 index 0000000000..955aadcffe --- /dev/null +++ b/types/cson-parser/cson-parser-tests.ts @@ -0,0 +1,5 @@ +import * as CSON from 'cson-parser'; + +CSON.parse('[ 1, 2, a: "str" ]'); + +CSON.stringify({ domain: 'typescript.org' }, null, 4); diff --git a/types/cson-parser/index.d.ts b/types/cson-parser/index.d.ts new file mode 100644 index 0000000000..b8e1db7421 --- /dev/null +++ b/types/cson-parser/index.d.ts @@ -0,0 +1,25 @@ +// Type definitions for cson-parser 4.0 +// Project: https://github.com/groupon/cson-parser +// Definitions by: Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export type ReplacerFunction = (key: string, value: any) => any; + +/** + * Converts a CSON string into an object. + * @param text A valid CSON string. + * @param reviver A function that transforms the results. This function is called for each member of the object. + * If a member contains nested objects, the nested objects are transformed before the parent object is. + */ +export function parse(text: string, reviver?: (key: any, value: any) => any): any; + +/** + * Converts a JavaScript value to a CSON string. + * @param value A JavaScript value, usually an object or array, to be converted. + * @param replacer A function that transforms the results or an array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified. + * @param space Adds indentation, white space, and line break characters to the return-value CSON text to make it easier to read. + */ +export function stringify(value: any, replacer?: ReplacerFunction | Array<(number | string)> | null, space?: string | number): string; diff --git a/types/cson-parser/tsconfig.json b/types/cson-parser/tsconfig.json new file mode 100644 index 0000000000..374ff4913f --- /dev/null +++ b/types/cson-parser/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "cson-parser-tests.ts" + ] +} diff --git a/types/cson-parser/tslint.json b/types/cson-parser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/cson-parser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ba67cbd87032a56e0c10378d989da955a0b902aa Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Sat, 1 Dec 2018 17:52:49 +0100 Subject: [PATCH 1040/1121] [sass] add typings --- types/sass/index.d.ts | 203 +++++++++++++++++++++++++++++++++++++++ types/sass/sass-tests.ts | 7 ++ types/sass/tsconfig.json | 23 +++++ types/sass/tslint.json | 1 + 4 files changed, 234 insertions(+) create mode 100644 types/sass/index.d.ts create mode 100644 types/sass/sass-tests.ts create mode 100644 types/sass/tsconfig.json create mode 100644 types/sass/tslint.json diff --git a/types/sass/index.d.ts b/types/sass/index.d.ts new file mode 100644 index 0000000000..0131836143 --- /dev/null +++ b/types/sass/index.d.ts @@ -0,0 +1,203 @@ +// Type definitions for sass 1.15 +// Project: https://github.com/sass/dart-sass +// Definitions by: Silas Rech +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +export type ImporterReturnType = { file: string } | { contents: string } | Error | null; + +export type Importer = (url: string, prev: string, done: (data: ImporterReturnType) => void) => ImporterReturnType | void; + +export interface Options { + /** + * Path to a file to compile. + * + * @default null + */ + file?: string; + + /** + * A string to pass to compile. + * + * It is recommended that you use `includePaths` in conjunction with this so that sass can find files when using the @import directive. + * + * @default null + */ + data?: string; + + /** + * Handles when the @import directive is encountered. + * + * A custom importer allows extension of the sass engine in both a synchronous and asynchronous manner. + * + * @default undefined + */ + importer?: Importer | Importer[]; + + /** + * Holds a collection of custom functions that may be invoked by the sass files being compiled. + * + * @default undefined + */ + functions?: { [key: string]: () => void }; + + /** + * An array of paths that should be looked in to attempt to resolve your @import declarations. + * When using `data`, it is recommended that you use this. + * + * @default [] + */ + includePaths?: string[]; + + /** + * Enable Sass Indented Syntax for parsing the data string or file. + * + * @default false + */ + indentedSyntax?: boolean; + + /** + * Used to determine whether to use space or tab character for indentation. + * + * @default 'space' + */ + indentType?: 'space' | 'tab'; + + /** + * Used to determine the number of spaces or tabs to be used for indentation. + * + * @default 2 + */ + indentWidth?: number; + + /** + * Used to determine which sequence to use for line breaks. + * + * @default 'lf' + */ + linefeed?: 'cr' | 'crlf' | 'lf' | 'lfcr'; + + /** + * Disable the inclusion of source map information in the output file. + * + * @default false + */ + omitSourceMapUrl?: boolean; + + /** + * Specify the intended location of the output file. + * Strongly recommended when outputting source maps so that they can properly refer back to their intended files. + * + * @default null + */ + outFile?: string; + + /** + * Determines the output format of the final CSS style. + * + * @default 'expanded' + */ + outputStyle?: 'compressed' | 'expanded'; + + /** + * Enables the outputting of a source map. + * + * @default undefined + */ + sourceMap?: boolean | string; + + /** + * Includes the contents in the source map information. + * + * @default false + */ + sourceMapContents?: boolean; + + /** + * Embeds the source map as a data URI. + * + * @default false + */ + sourceMapEmbed?: boolean; + + /** + * The value will be emitted as `sourceRoot` in the source map information. + * + * @default undefined + */ + sourceMapRoot?: string; +} + +export interface SassException extends Error { + /** + * The error message. + */ + message: string; + + /** + * The line number of error. + */ + line: number; + + /** + * The column number of error. + */ + column: number; + + /** + * The status code. + */ + status: number; + + /** + * The filename of error. + * + * In case file option was not set (in favour of `data`), this will reflect the value `stdin`. + */ + file: string; +} + +export interface Result { + /** + * The compiled CSS. + * + * Write this to a file, or serve it out as needed. + */ + css: Buffer; + + /** + * The source map. + */ + map?: Buffer; + stats: { + /** + * The path to the scss file, or `data` if the source was not a file. + */ + entry: string; + + /** + * `Date.now()` before the compilation. + */ + start: number; + + /** + * `Date.now()` after the compilation. + */ + end: number; + + /** + * `end - start` + */ + duration: number; + + /** + * Absolute paths to all related files in no particular order. + */ + includedFiles: string[]; + }; +} + +export function render(options: Options, callback: (exception: SassException, result: Result) => void): void; +export function renderSync(options: Options): Result; diff --git a/types/sass/sass-tests.ts b/types/sass/sass-tests.ts new file mode 100644 index 0000000000..ae656d0a98 --- /dev/null +++ b/types/sass/sass-tests.ts @@ -0,0 +1,7 @@ +import * as sass from 'sass'; + +sass.renderSync({ + file: 'index.scss', + sourceMap: true, + outFile: 'index.css', +}); diff --git a/types/sass/tsconfig.json b/types/sass/tsconfig.json new file mode 100644 index 0000000000..11599da1da --- /dev/null +++ b/types/sass/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sass-tests.ts" + ] +} diff --git a/types/sass/tslint.json b/types/sass/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sass/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ff503e74dd923e53cf48c6989eda5cc6a3b543d0 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 01:38:59 -0200 Subject: [PATCH 1041/1121] passport-bnet type definitions --- types/passport-bnet/index.d.ts | 42 ++++++++++++++ types/passport-bnet/passport-bnet-tests.ts | 65 ++++++++++++++++++++++ types/passport-bnet/tsconfig.json | 23 ++++++++ types/passport-bnet/tslint.json | 1 + 4 files changed, 131 insertions(+) create mode 100644 types/passport-bnet/index.d.ts create mode 100644 types/passport-bnet/passport-bnet-tests.ts create mode 100644 types/passport-bnet/tsconfig.json create mode 100644 types/passport-bnet/tslint.json diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts new file mode 100644 index 0000000000..ef6f977830 --- /dev/null +++ b/types/passport-bnet/index.d.ts @@ -0,0 +1,42 @@ +// Type definitions for passport-bnet 2.0.0 +// Project: https://github.com/Blizzard/passport-bnet#readme +// Definitions by: Ivan Fernandes +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest } from 'passport-oauth2'; + +declare class BnetStrategy extends OAuth2Strategy { + constructor(options: BnetStrategy.StrategyOptions, verify: VerifyFunction); + constructor(options: BnetStrategy.StrategyOptionsWithRequest, verify: VerifyFunctionWithRequest); +} + +declare namespace BnetStrategy { + + interface _BaseBnetOptions { + region?: string; + + scopeSeparator?: string; + customHeaders?: object; + authorizationURL?: string; + tokenURL?: string; + scope?: string; + clientID: string; + clientSecret: string; + callbackURL?: string; + } + + interface StrategyOptions extends _BaseBnetOptions { + passReqToCallback?: false; + } + + interface StrategyOptionsWithRequest extends _BaseBnetOptions { + passReqToCallback: true; + } + + function getHost(region: string): string; + + type Strategy = BnetStrategy; + const Strategy: typeof BnetStrategy; +} + +export = BnetStrategy \ No newline at end of file diff --git a/types/passport-bnet/passport-bnet-tests.ts b/types/passport-bnet/passport-bnet-tests.ts new file mode 100644 index 0000000000..86f3090c88 --- /dev/null +++ b/types/passport-bnet/passport-bnet-tests.ts @@ -0,0 +1,65 @@ +//Based on passport-oauth2/passport-oauth2-tests.ts + +import BnetStrategy = require("passport-bnet"); +import { Strategy, StrategyOptions, StrategyOptionsWithRequest } from "passport-bnet"; +import { Strategy as OAuth2Strategy } from "passport-oauth2"; +import { VerifyCallback } from "passport-oauth2"; +import { Request } from "express"; + +const strategyOptions1: StrategyOptions = { + authorizationURL: 'http://www.example.com/auth', + callbackURL: 'http://www.example.com/callback', + clientID: 'dummy', + clientSecret: 'secret', + tokenURL: 'http://www.example.com/token', + region: 'us', + scope: "email", + scopeSeparator: ' ', + customHeaders: {} +} + +function verifyFunction1(_accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(new Error('unimplemented')); +} + +function verifyFunction2(_accessToken: string, _refreshToken: string, _results: any, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(new Error('unimplemented')); +} + +const strategy1: BnetStrategy = new BnetStrategy(strategyOptions1, verifyFunction1); + +const strategy2: Strategy = new BnetStrategy(strategyOptions1, verifyFunction2); + +function verifyFunction3(_req: Request, _accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(undefined, { userid: '1' }); +} + +function verifyFunction4(_req: Request, _accessToken: string, _refreshToken: string, _results: any, _profile: any, verifyCallback: VerifyCallback) { + verifyCallback(undefined, { userid: '1' }); +} + +const strategyOptions2: StrategyOptionsWithRequest = { + authorizationURL: 'http://www.example.com/auth', + callbackURL: 'http://www.example.com/callback', + clientID: 'dummy', + clientSecret: 'secret', + tokenURL: 'http://www.example.com/token', + region: 'us', + scope: "email", + scopeSeparator: ' ', + customHeaders: {}, + passReqToCallback: true +}; + +const strategy3: OAuth2Strategy = new BnetStrategy +(strategyOptions2, verifyFunction3); + +const strategy4: Strategy = new Strategy(strategyOptions2, verifyFunction4); + +class MyStrategy extends BnetStrategy { + useProtectedProperty() { + this._oauth2.get('http://www.example.com/profile', 'token', err => err.statusCode); + this._oauth2.get('http://www.example.com/profile', 'token', (err, result) => result); + this._oauth2.get('http://www.example.com/profile', 'token', (err, result, response) => response); + } +} \ No newline at end of file diff --git a/types/passport-bnet/tsconfig.json b/types/passport-bnet/tsconfig.json new file mode 100644 index 0000000000..28da7a7a65 --- /dev/null +++ b/types/passport-bnet/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "passport-bnet-tests.ts" + ] +} \ No newline at end of file diff --git a/types/passport-bnet/tslint.json b/types/passport-bnet/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/passport-bnet/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 374b24ef8732e7907faef7bb13b4326191d1747d Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 02:03:00 -0200 Subject: [PATCH 1042/1121] adding typescript version --- types/passport-bnet/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index ef6f977830..1b28ee21ad 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/Blizzard/passport-bnet#readme // Definitions by: Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import { Strategy as OAuth2Strategy, VerifyFunction, VerifyFunctionWithRequest } from 'passport-oauth2'; From 55dc8ebd80d0386841468e2c515aba766fba5da3 Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 02:10:27 -0200 Subject: [PATCH 1043/1121] fomatting --- types/passport-bnet/index.d.ts | 7 +++---- types/passport-bnet/passport-bnet-tests.ts | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index 1b28ee21ad..e5493a8d3c 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for passport-bnet 2.0.0 +// Type definitions for passport-bnet 2.0. // Project: https://github.com/Blizzard/passport-bnet#readme // Definitions by: Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,7 +12,6 @@ declare class BnetStrategy extends OAuth2Strategy { } declare namespace BnetStrategy { - interface _BaseBnetOptions { region?: string; @@ -20,7 +19,7 @@ declare namespace BnetStrategy { customHeaders?: object; authorizationURL?: string; tokenURL?: string; - scope?: string; + scope?: string; clientID: string; clientSecret: string; callbackURL?: string; @@ -40,4 +39,4 @@ declare namespace BnetStrategy { const Strategy: typeof BnetStrategy; } -export = BnetStrategy \ No newline at end of file +export = BnetStrategy; diff --git a/types/passport-bnet/passport-bnet-tests.ts b/types/passport-bnet/passport-bnet-tests.ts index 86f3090c88..06c0ffccec 100644 --- a/types/passport-bnet/passport-bnet-tests.ts +++ b/types/passport-bnet/passport-bnet-tests.ts @@ -1,9 +1,8 @@ -//Based on passport-oauth2/passport-oauth2-tests.ts +// Based on passport-oauth2/passport-oauth2-tests.ts import BnetStrategy = require("passport-bnet"); import { Strategy, StrategyOptions, StrategyOptionsWithRequest } from "passport-bnet"; -import { Strategy as OAuth2Strategy } from "passport-oauth2"; -import { VerifyCallback } from "passport-oauth2"; +import { Strategy as OAuth2Strategy, VerifyCallback } from "passport-oauth2"; import { Request } from "express"; const strategyOptions1: StrategyOptions = { @@ -16,7 +15,7 @@ const strategyOptions1: StrategyOptions = { scope: "email", scopeSeparator: ' ', customHeaders: {} -} +}; function verifyFunction1(_accessToken: string, _refreshToken: string, _profile: any, verifyCallback: VerifyCallback) { verifyCallback(new Error('unimplemented')); @@ -62,4 +61,4 @@ class MyStrategy extends BnetStrategy { this._oauth2.get('http://www.example.com/profile', 'token', (err, result) => result); this._oauth2.get('http://www.example.com/profile', 'token', (err, result, response) => response); } -} \ No newline at end of file +} From 47fa3e69a48443e99093497e234cd5fb4159761d Mon Sep 17 00:00:00 2001 From: Ivan Fernandes Date: Sun, 2 Dec 2018 02:12:46 -0200 Subject: [PATCH 1044/1121] fixing version notation --- types/passport-bnet/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/passport-bnet/index.d.ts b/types/passport-bnet/index.d.ts index e5493a8d3c..86255c782d 100644 --- a/types/passport-bnet/index.d.ts +++ b/types/passport-bnet/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for passport-bnet 2.0. +// Type definitions for passport-bnet 2.0 // Project: https://github.com/Blizzard/passport-bnet#readme // Definitions by: Ivan Fernandes // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From c45cef2c6ebdbb8764f2631154f61213109c5733 Mon Sep 17 00:00:00 2001 From: Kobi Cohen Date: Sun, 2 Dec 2018 12:58:30 +0200 Subject: [PATCH 1045/1121] updating isMatchWithCustomizer type to accept two more arguments: object and source per lodash docs https://lodash.com/docs/4.17.11#isMatchWith --- types/lodash/common/lang.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/lodash/common/lang.d.ts b/types/lodash/common/lang.d.ts index 9afe554b28..723388c9cc 100644 --- a/types/lodash/common/lang.d.ts +++ b/types/lodash/common/lang.d.ts @@ -1020,7 +1020,7 @@ declare module "../index" { // isMatchWith - type isMatchWithCustomizer = (value: any, other: any, indexOrKey: PropertyName) => boolean; + type isMatchWithCustomizer = (value: any, other: any, indexOrKey: PropertyName, object: object, source: object) => boolean; interface LoDashStatic { /** From df0bcd09d20e3b763664f4d4ca249ce0b22687c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20D=C3=BCfel?= Date: Sun, 2 Dec 2018 17:13:01 +0100 Subject: [PATCH 1046/1121] Replace Bluebird by native Promises --- types/bull/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/bull/index.d.ts b/types/bull/index.d.ts index c08048f1d7..2d18e0a800 100644 --- a/types/bull/index.d.ts +++ b/types/bull/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for bull 3.4 +// Type definitions for bull 3.5 // Project: https://github.com/OptimalBits/bull // Definitions by: Bruno Grieder // Cameron Crothers @@ -17,7 +17,6 @@ // TypeScript Version: 2.8 import * as Redis from "ioredis"; -import * as Promise from "bluebird"; /** * This is the Queue constructor. From 788d99040f5ae9e75dbf8649b4856eaf18d07ea3 Mon Sep 17 00:00:00 2001 From: Robin Hames Date: Sun, 2 Dec 2018 18:50:31 +0000 Subject: [PATCH 1047/1121] Add configPath to ConfigStoreOptions in @types/configstore --- types/configstore/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/configstore/index.d.ts b/types/configstore/index.d.ts index 2617f2bce0..bbc0740c23 100644 --- a/types/configstore/index.d.ts +++ b/types/configstore/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for configstore 2.1 +// Type definitions for configstore 4.0 // Project: https://github.com/yeoman/configstore // Definitions by: ArcticLight // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -67,5 +67,6 @@ declare class Configstore { declare namespace Configstore { interface ConfigstoreOptions { globalConfigPath?: boolean; + configPath?: string; } } From 4e8911977001fbfef99652853e182ef604d8b86a Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 19:38:23 +0100 Subject: [PATCH 1048/1121] Add types for fuzzy-search --- types/fuzzy-search/fuzzy-search-tests.ts | 27 ++++++++++++++++++++++++ types/fuzzy-search/index.d.ts | 26 +++++++++++++++++++++++ types/fuzzy-search/tsconfig.json | 23 ++++++++++++++++++++ types/fuzzy-search/tslint.json | 1 + 4 files changed, 77 insertions(+) create mode 100644 types/fuzzy-search/fuzzy-search-tests.ts create mode 100644 types/fuzzy-search/index.d.ts create mode 100644 types/fuzzy-search/tsconfig.json create mode 100644 types/fuzzy-search/tslint.json diff --git a/types/fuzzy-search/fuzzy-search-tests.ts b/types/fuzzy-search/fuzzy-search-tests.ts new file mode 100644 index 0000000000..667cda446f --- /dev/null +++ b/types/fuzzy-search/fuzzy-search-tests.ts @@ -0,0 +1,27 @@ +import FuzzySearch = require('fuzzy-search'); + +const f = new FuzzySearch(['1', '2', '3']); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a']); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], {}); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], { caseSensitive: true }); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], { sort: true }); + +new FuzzySearch([{ a: 1 }, { a: 2 }, { a: 3 }], ['a'], { caseSensitive: true, sort: true }); + +let strArr: string[]; + +strArr = f.haystack; +// $ExpectType string[] +f.keys; +// $ExpectType Required +f.options; + +strArr = new FuzzySearch(['1', '2', '3']).search(); +strArr = new FuzzySearch(['1', '2', '3']).search('2'); + +// $ExpectType number +FuzzySearch.isMatch('1', '1', false); diff --git a/types/fuzzy-search/index.d.ts b/types/fuzzy-search/index.d.ts new file mode 100644 index 0000000000..8c3d5103ff --- /dev/null +++ b/types/fuzzy-search/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for fuzzy-search 2.1 +// Project: https://github.com/wouter2203/fuzzy-search#readme +// Definitions by: Alex Deas +// BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +declare class FuzzySearch { + haystack: T[]; + keys: string[]; + options: Required; + + static isMatch(item: string, query: string, caseSensitive: boolean): number; + + constructor(haystack: T[], keys?: string[], options?: FuzzySearch.Options); + search(needle?: string): T[]; +} + +declare namespace FuzzySearch { + interface Options { + caseSensitive?: boolean; + sort?: boolean; + } +} + +export = FuzzySearch; diff --git a/types/fuzzy-search/tsconfig.json b/types/fuzzy-search/tsconfig.json new file mode 100644 index 0000000000..c72f9609d0 --- /dev/null +++ b/types/fuzzy-search/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "fuzzy-search-tests.ts" + ] +} diff --git a/types/fuzzy-search/tslint.json b/types/fuzzy-search/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/fuzzy-search/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 1aeeff704cbf6b3ab599b4b6ff232690771b2099 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Sun, 2 Dec 2018 20:21:13 +0100 Subject: [PATCH 1049/1121] Add types for snakecase-keys --- types/snakecase-keys/index.d.ts | 19 ++++++++++++++++ types/snakecase-keys/snakecase-keys-tests.ts | 5 +++++ types/snakecase-keys/tsconfig.json | 23 ++++++++++++++++++++ types/snakecase-keys/tslint.json | 1 + 4 files changed, 48 insertions(+) create mode 100644 types/snakecase-keys/index.d.ts create mode 100644 types/snakecase-keys/snakecase-keys-tests.ts create mode 100644 types/snakecase-keys/tsconfig.json create mode 100644 types/snakecase-keys/tslint.json diff --git a/types/snakecase-keys/index.d.ts b/types/snakecase-keys/index.d.ts new file mode 100644 index 0000000000..d9afe0a2fd --- /dev/null +++ b/types/snakecase-keys/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for snakecase-keys 2.1 +// Project: https://github.com/bendrucker/snakecase-keys#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = snakecaseKeys; + +declare function snakecaseKeys( + obj: object, + options?: snakecaseKeys.Options +): { [key: string]: any }; + +declare namespace snakecaseKeys { + interface Options { + deep?: boolean; + exclude?: Array; + } +} diff --git a/types/snakecase-keys/snakecase-keys-tests.ts b/types/snakecase-keys/snakecase-keys-tests.ts new file mode 100644 index 0000000000..e74d13404f --- /dev/null +++ b/types/snakecase-keys/snakecase-keys-tests.ts @@ -0,0 +1,5 @@ +import snakecaseKeys = require('snakecase-keys'); + +snakecaseKeys({ fooBar: 'baz' }); +snakecaseKeys({ fooBar: 'baz' }, { deep: false }); +snakecaseKeys({ fooBar: 'baz' }, { exclude: ['fooBax', /Foo$/] }); diff --git a/types/snakecase-keys/tsconfig.json b/types/snakecase-keys/tsconfig.json new file mode 100644 index 0000000000..6d944fa502 --- /dev/null +++ b/types/snakecase-keys/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "snakecase-keys-tests.ts" + ] +} diff --git a/types/snakecase-keys/tslint.json b/types/snakecase-keys/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/snakecase-keys/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ec7a15613f2ccdb7e63d0ffc1d154bfa93395355 Mon Sep 17 00:00:00 2001 From: Robin Hames Date: Sun, 2 Dec 2018 19:21:34 +0000 Subject: [PATCH 1050/1121] Add test for ConfigStoreOptions.configPath in @types/configstore --- types/configstore/configstore-tests.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/types/configstore/configstore-tests.ts b/types/configstore/configstore-tests.ts index ffd04e31a7..9365afdbda 100644 --- a/types/configstore/configstore-tests.ts +++ b/types/configstore/configstore-tests.ts @@ -5,6 +5,7 @@ let value: any; let key: string; let num: number; let object: any; +let path: string; cs.set(key, value); value = cs.get(key); @@ -13,4 +14,12 @@ cs.delete(key); object = cs.all; cs.all = object; num = cs.size; -key = cs.path; +path = cs.path; + +const csWithPathOption = new Configstore('foo', null, { configPath: path }); + +csWithPathOption.set(key, value); +value = csWithPathOption.get(key); +csWithPathOption.delete(key); + +key = csWithPathOption.path; From 1bb213f443c6dc0eff1792967feb08b0aa59e555 Mon Sep 17 00:00:00 2001 From: Jacob Greenfield Date: Sun, 2 Dec 2018 14:50:04 -0500 Subject: [PATCH 1051/1121] Make argument to getFormatter optional See here: https://eslint.org/docs/developer-guide/nodejs-api#clienginegetformatter --- types/eslint/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/eslint/index.d.ts b/types/eslint/index.d.ts index 451477af40..01f39ee83e 100644 --- a/types/eslint/index.d.ts +++ b/types/eslint/index.d.ts @@ -471,7 +471,7 @@ export class CLIEngine { isPathIgnored(filePath: string): boolean; - getFormatter(format: string): CLIEngine.Formatter; + getFormatter(format?: string): CLIEngine.Formatter; getRules(): Map; From 9f24a56a9c1cd62aae856f0c1154b4ea99e04d1a Mon Sep 17 00:00:00 2001 From: Jacob Greenfield Date: Sun, 2 Dec 2018 15:02:01 -0500 Subject: [PATCH 1052/1121] Update tests --- types/eslint/eslint-tests.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/eslint/eslint-tests.ts b/types/eslint/eslint-tests.ts index c6b8b786fa..ed211d220e 100644 --- a/types/eslint/eslint-tests.ts +++ b/types/eslint/eslint-tests.ts @@ -480,7 +480,10 @@ cli.addPlugin('my-fancy-plugin', {}); cli.isPathIgnored('./dist/index.js'); -const formatter = cli.getFormatter('codeframe'); +let formatter: CLIEngine.Formatter; + +formatter = cli.getFormatter('codeframe'); +formatter = cli.getFormatter(); formatter(cliReport.results); From 0dc2aeee2feacafe39f0a73dc07fd2cd090e9a32 Mon Sep 17 00:00:00 2001 From: Jannik Keye Date: Sun, 2 Dec 2018 22:02:51 +0100 Subject: [PATCH 1053/1121] fxi: fastify version support 2.0 release candidate --- types/fastify-jwt/fastify-jwt-tests.ts | 7 +++---- types/fastify-jwt/package.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/types/fastify-jwt/fastify-jwt-tests.ts b/types/fastify-jwt/fastify-jwt-tests.ts index 6b92026b04..fc68ac8bcc 100644 --- a/types/fastify-jwt/fastify-jwt-tests.ts +++ b/types/fastify-jwt/fastify-jwt-tests.ts @@ -1,17 +1,16 @@ -import { IncomingMessage, Server, ServerResponse } from "http"; -import fastifyJwt = require("fastify-jwt"); import fastify = require("fastify"); +import fastifyJwt = require("fastify-jwt"); const app = fastify(); app.register(fastifyJwt, { - secret: "super-secret" + secret: "super-secret", }); app.register(fastifyJwt, { secret: (request, reply, callback) => { return ""; - } + }, }); app.get("/path", (request, reply) => { diff --git a/types/fastify-jwt/package.json b/types/fastify-jwt/package.json index e8c68ab969..5eb77c39fa 100644 --- a/types/fastify-jwt/package.json +++ b/types/fastify-jwt/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "fastify": "^1.11.2" + "fastify": ">=1.13.1 || 2.0.0-rc.1" } } From 8ac2b26cf846b8ad38e2ade7a51b03cb3e963dc3 Mon Sep 17 00:00:00 2001 From: Ilari Aarnio Date: Sun, 2 Dec 2018 23:09:05 +0200 Subject: [PATCH 1054/1121] Add missing types for imap-simple 4.2 Add type definitions for functions: - addBox - delBox - getBoxes - append Fix parameter name for delFlags. --- types/imap-simple/index.d.ts | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/types/imap-simple/index.d.ts b/types/imap-simple/index.d.ts index 3bde57c113..a45629f234 100644 --- a/types/imap-simple/index.d.ts +++ b/types/imap-simple/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for imap-simple v3.1.0 +// Type definitions for imap-simple v4.2.0 // Project: https://github.com/chadxz/imap-simple // Definitions by: Jeffery Grajkowski +// Ilari Aarnio // Definitions: https://github.com/psnider/DefinitelyTyped/imap-simple /// @@ -42,6 +43,18 @@ export class ImapSimple extends NodeJS.EventEmitter { openBox(boxName: string, callback: (err: Error, boxName: string) => void): void; openBox(boxName: string): Promise; + /** Create a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */ + addBox(boxName: string, callback: (err: Error, boxName: string) => void): void; + addBox(boxName: string): Promise; + + /** Delete a mailbox, calling the provided callback with signature (err, boxName), or resolves the returned promise with boxName. */ + delBox(boxName: string, callback: (err: Error, boxName: string) => void): void; + delBox(boxName: string): Promise; + + /** Returns the full list of mailboxes (folders). Upon success, either the provided callback will be called with signature (err, boxes), or the returned promise will be resolved with boxes. Boxes is the exact object returned from the node-imap getBoxes() result. */ + getBoxes(callback: (err: Error, boxes: any) => void): void; + getBoxes(): Promise; + /** Search for and retrieve mail in the previously opened mailbox. */ search(searchCriteria: any[], fetchOptions: Imap.FetchOptions, callback: (err: Error, messages: Message[]) => void): void; search(searchCriteria: any[], fetchOptions: Imap.FetchOptions): Promise; @@ -57,6 +70,10 @@ export class ImapSimple extends NodeJS.EventEmitter { addMessageLabel(source: string | string[], label: string | string[], callback: (err: Error) => void): void; addMessageLabel(source: string | string[], label: string | string[]): Promise; + /** Appends the argument message to the currently open mailbox or another mailbox. Message is a RFC-822 compatible MIME message. Valid options are mailbox, flags and date. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ + append(message: any, options: any, callback: (err: Error) => void): void; + append(message: any, options: any): Promise; + /** Moves the specified message(s) in the currently open mailbox to another mailbox. source corresponds to a node-imap MessageSource which specifies the messages to be moved. When completed, either calls the provided callback with signature (err), or resolves the returned promise. */ moveMessage(source: string | string[], boxName: string, callback: (err: Error) => void): void; moveMessage(source: string | string[], boxName: string): Promise; @@ -66,8 +83,8 @@ export class ImapSimple extends NodeJS.EventEmitter { addFlags(source: string | string[], flag: string | string[]): Promise; /** Removes the provided flag(s) from the specified message(s). uid is the uid of the message you want to remove the flag from or an array of uids. flag is either a string or array of strings indicating the flags to remove. */ - delFlags(source: string | string[], flag: string | string[], callback: (err: Error) => void): void; - delFlags(source: string | string[], flag: string | string[]): Promise; + delFlags(uid: string | string[], flag: string | string[], callback: (err: Error) => void): void; + delFlags(uid: string | string[], flag: string | string[]): Promise; } export namespace errors { From 539239405f26d75d0dab48f5f4cb5131a324452b Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Sun, 2 Dec 2018 22:40:44 +0100 Subject: [PATCH 1055/1121] Add roman-numerals --- types/roman-numerals/index.d.ts | 7 +++++++ types/roman-numerals/roman-numerals-tests.ts | 5 +++++ types/roman-numerals/tsconfig.json | 16 ++++++++++++++++ types/roman-numerals/tslint.json | 1 + 4 files changed, 29 insertions(+) create mode 100644 types/roman-numerals/index.d.ts create mode 100644 types/roman-numerals/roman-numerals-tests.ts create mode 100644 types/roman-numerals/tsconfig.json create mode 100644 types/roman-numerals/tslint.json diff --git a/types/roman-numerals/index.d.ts b/types/roman-numerals/index.d.ts new file mode 100644 index 0000000000..0ab8e88047 --- /dev/null +++ b/types/roman-numerals/index.d.ts @@ -0,0 +1,7 @@ +// Type definitions for roman-numerals 0.3 +// Project: https://github.com/joshleaves/roman-numerals +// Definitions by: Alan Plum +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function toRoman(arabic: number): string; +export function toArabic(roman: string): number; diff --git a/types/roman-numerals/roman-numerals-tests.ts b/types/roman-numerals/roman-numerals-tests.ts new file mode 100644 index 0000000000..a99972afae --- /dev/null +++ b/types/roman-numerals/roman-numerals-tests.ts @@ -0,0 +1,5 @@ +import { toArabic, toRoman } from "roman-numerals"; + +const XLII: string = toRoman(42); +const meaningOfLife: number = toArabic(XLII); +toRoman(meaningOfLife); diff --git a/types/roman-numerals/tsconfig.json b/types/roman-numerals/tsconfig.json new file mode 100644 index 0000000000..7edc311353 --- /dev/null +++ b/types/roman-numerals/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "roman-numerals-tests.ts"] +} diff --git a/types/roman-numerals/tslint.json b/types/roman-numerals/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/roman-numerals/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From ccce0edf6d9dd01a3479daf4b98da3dc7d0bd442 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:26:33 +0100 Subject: [PATCH 1056/1121] Add types for unique-random-array --- types/unique-random-array/index.d.ts | 8 +++++++ types/unique-random-array/tsconfig.json | 23 +++++++++++++++++++ types/unique-random-array/tslint.json | 1 + .../unique-random-array-tests.ts | 6 +++++ 4 files changed, 38 insertions(+) create mode 100644 types/unique-random-array/index.d.ts create mode 100644 types/unique-random-array/tsconfig.json create mode 100644 types/unique-random-array/tslint.json create mode 100644 types/unique-random-array/unique-random-array-tests.ts diff --git a/types/unique-random-array/index.d.ts b/types/unique-random-array/index.d.ts new file mode 100644 index 0000000000..7e4ddacb0f --- /dev/null +++ b/types/unique-random-array/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for unique-random-array 1.0 +// Project: https://github.com/sindresorhus/unique-random-array#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = uniqueRandomArray; + +declare function uniqueRandomArray(input: T[]): () => T; diff --git a/types/unique-random-array/tsconfig.json b/types/unique-random-array/tsconfig.json new file mode 100644 index 0000000000..40257f7e47 --- /dev/null +++ b/types/unique-random-array/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "unique-random-array-tests.ts" + ] +} diff --git a/types/unique-random-array/tslint.json b/types/unique-random-array/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/unique-random-array/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/unique-random-array/unique-random-array-tests.ts b/types/unique-random-array/unique-random-array-tests.ts new file mode 100644 index 0000000000..de4563532c --- /dev/null +++ b/types/unique-random-array/unique-random-array-tests.ts @@ -0,0 +1,6 @@ +import uniqueRandomArray = require('unique-random-array'); + +// $ExpectType () => number +uniqueRandomArray([1, 2, 3, 4]); +// $ExpectType () => string | number +uniqueRandomArray(["1", 2, 3, 4]); From efaad74d08d3ce0d09f50a3c9b387e1e847df7bb Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:35:54 +0100 Subject: [PATCH 1057/1121] Add types for random-int --- types/random-int/index.d.ts | 9 +++++++++ types/random-int/random-int-tests.ts | 6 ++++++ types/random-int/tsconfig.json | 23 +++++++++++++++++++++++ types/random-int/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/random-int/index.d.ts create mode 100644 types/random-int/random-int-tests.ts create mode 100644 types/random-int/tsconfig.json create mode 100644 types/random-int/tslint.json diff --git a/types/random-int/index.d.ts b/types/random-int/index.d.ts new file mode 100644 index 0000000000..6f7f421976 --- /dev/null +++ b/types/random-int/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for random-int 1.0 +// Project: https://github.com/sindresorhus/random-int +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomInt; + +declare function randomInt(max: number): number; +declare function randomInt(min: number, max: number): number; // tslint:disable-line unified-signatures diff --git a/types/random-int/random-int-tests.ts b/types/random-int/random-int-tests.ts new file mode 100644 index 0000000000..68165e9c5d --- /dev/null +++ b/types/random-int/random-int-tests.ts @@ -0,0 +1,6 @@ +import randomInt = require('random-int'); + +// $ExpectType number +randomInt(5); +// $ExpectType number +randomInt(10, 100); diff --git a/types/random-int/tsconfig.json b/types/random-int/tsconfig.json new file mode 100644 index 0000000000..e1a576d337 --- /dev/null +++ b/types/random-int/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-int-tests.ts" + ] +} diff --git a/types/random-int/tslint.json b/types/random-int/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-int/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a6d95779bae652a238cd584d66e5009e02d54888 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:42:33 +0100 Subject: [PATCH 1058/1121] Add types for random-float --- types/random-float/index.d.ts | 9 +++++++++ types/random-float/random-float-tests.ts | 6 ++++++ types/random-float/tsconfig.json | 23 +++++++++++++++++++++++ types/random-float/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 types/random-float/index.d.ts create mode 100644 types/random-float/random-float-tests.ts create mode 100644 types/random-float/tsconfig.json create mode 100644 types/random-float/tslint.json diff --git a/types/random-float/index.d.ts b/types/random-float/index.d.ts new file mode 100644 index 0000000000..646d263128 --- /dev/null +++ b/types/random-float/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for random-float 1.0 +// Project: https://github.com/sindresorhus/random-float +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomFloat; + +declare function randomFloat(max: number): number; +declare function randomFloat(min: number, max: number): number; // tslint:disable-line unified-signatures diff --git a/types/random-float/random-float-tests.ts b/types/random-float/random-float-tests.ts new file mode 100644 index 0000000000..663190ce81 --- /dev/null +++ b/types/random-float/random-float-tests.ts @@ -0,0 +1,6 @@ +import randomFloat = require('random-float'); + +// $ExpectType number +randomFloat(5); +// $ExpectType number +randomFloat(10, 100); diff --git a/types/random-float/tsconfig.json b/types/random-float/tsconfig.json new file mode 100644 index 0000000000..faefa13645 --- /dev/null +++ b/types/random-float/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-float-tests.ts" + ] +} diff --git a/types/random-float/tslint.json b/types/random-float/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-float/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From cfc0da48c03bde6f87e9d06aa11e1cb3aa6f98ab Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 00:46:11 +0100 Subject: [PATCH 1059/1121] Add types for random-boolean --- types/random-boolean/index.d.ts | 8 +++++++ types/random-boolean/random-boolean-tests.ts | 4 ++++ types/random-boolean/tsconfig.json | 23 ++++++++++++++++++++ types/random-boolean/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/random-boolean/index.d.ts create mode 100644 types/random-boolean/random-boolean-tests.ts create mode 100644 types/random-boolean/tsconfig.json create mode 100644 types/random-boolean/tslint.json diff --git a/types/random-boolean/index.d.ts b/types/random-boolean/index.d.ts new file mode 100644 index 0000000000..3390da9317 --- /dev/null +++ b/types/random-boolean/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for random-boolean 1.0 +// Project: https://github.com/arthurvr/random-boolean#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomBoolean; + +declare function randomBoolean(): boolean; diff --git a/types/random-boolean/random-boolean-tests.ts b/types/random-boolean/random-boolean-tests.ts new file mode 100644 index 0000000000..8ac983e111 --- /dev/null +++ b/types/random-boolean/random-boolean-tests.ts @@ -0,0 +1,4 @@ +import randomBoolean = require('random-boolean'); + +// $ExpectType boolean +randomBoolean(); diff --git a/types/random-boolean/tsconfig.json b/types/random-boolean/tsconfig.json new file mode 100644 index 0000000000..7392190732 --- /dev/null +++ b/types/random-boolean/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-boolean-tests.ts" + ] +} diff --git a/types/random-boolean/tslint.json b/types/random-boolean/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-boolean/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a7f31adfd5f8480e9c42ba7aa07cedfbcd346beb Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 01:07:20 +0100 Subject: [PATCH 1060/1121] Add types for random-obj-key --- types/random-obj-key/index.d.ts | 9 ++++++++ types/random-obj-key/random-obj-key-tests.ts | 4 ++++ types/random-obj-key/tsconfig.json | 23 ++++++++++++++++++++ types/random-obj-key/tslint.json | 1 + 4 files changed, 37 insertions(+) create mode 100644 types/random-obj-key/index.d.ts create mode 100644 types/random-obj-key/random-obj-key-tests.ts create mode 100644 types/random-obj-key/tsconfig.json create mode 100644 types/random-obj-key/tslint.json diff --git a/types/random-obj-key/index.d.ts b/types/random-obj-key/index.d.ts new file mode 100644 index 0000000000..dfe12ca6f6 --- /dev/null +++ b/types/random-obj-key/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for random-obj-key 1.0 +// Project: https://github.com/sindresorhus/random-obj-key +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +export = randomObjKey; + +declare function randomObjKey(input: TObj): keyof TObj; diff --git a/types/random-obj-key/random-obj-key-tests.ts b/types/random-obj-key/random-obj-key-tests.ts new file mode 100644 index 0000000000..b12cf282ea --- /dev/null +++ b/types/random-obj-key/random-obj-key-tests.ts @@ -0,0 +1,4 @@ +import randomObjKey = require('random-obj-key'); + +// $ExpectType "foo" | "bar" +randomObjKey({ foo: true, bar: true }); diff --git a/types/random-obj-key/tsconfig.json b/types/random-obj-key/tsconfig.json new file mode 100644 index 0000000000..aaaf33ba98 --- /dev/null +++ b/types/random-obj-key/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-obj-key-tests.ts" + ] +} diff --git a/types/random-obj-key/tslint.json b/types/random-obj-key/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-obj-key/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a3f716d8f28c05469b8409d0c32a7146ec9a57f3 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 01:13:39 +0100 Subject: [PATCH 1061/1121] Add types for random-item --- types/random-item/index.d.ts | 8 ++++++++ types/random-item/random-item-tests.ts | 6 ++++++ types/random-item/tsconfig.json | 23 +++++++++++++++++++++++ types/random-item/tslint.json | 1 + 4 files changed, 38 insertions(+) create mode 100644 types/random-item/index.d.ts create mode 100644 types/random-item/random-item-tests.ts create mode 100644 types/random-item/tsconfig.json create mode 100644 types/random-item/tslint.json diff --git a/types/random-item/index.d.ts b/types/random-item/index.d.ts new file mode 100644 index 0000000000..3fbbaca074 --- /dev/null +++ b/types/random-item/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for random-item 1.0 +// Project: https://github.com/sindresorhus/random-item +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomItem; + +declare function randomItem(input: T[]): T; diff --git a/types/random-item/random-item-tests.ts b/types/random-item/random-item-tests.ts new file mode 100644 index 0000000000..12185a0ad2 --- /dev/null +++ b/types/random-item/random-item-tests.ts @@ -0,0 +1,6 @@ +import randomItem = require('random-item'); + +// $ExpectType string +randomItem(['pony', 'unicorn', 'rainbow']); +// $ExpectType string | number +randomItem(['pony', 'unicorn', 'rainbow', 1]); diff --git a/types/random-item/tsconfig.json b/types/random-item/tsconfig.json new file mode 100644 index 0000000000..279aba16b5 --- /dev/null +++ b/types/random-item/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-item-tests.ts" + ] +} diff --git a/types/random-item/tslint.json b/types/random-item/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-item/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From f47939d42dcfe49da2bb73ad1662159bb50ad0e2 Mon Sep 17 00:00:00 2001 From: Dimitri Benin Date: Mon, 3 Dec 2018 01:22:11 +0100 Subject: [PATCH 1062/1121] Add types for random-obj-prop --- types/random-obj-prop/index.d.ts | 8 +++++++ .../random-obj-prop/random-obj-prop-tests.ts | 4 ++++ types/random-obj-prop/tsconfig.json | 23 +++++++++++++++++++ types/random-obj-prop/tslint.json | 1 + 4 files changed, 36 insertions(+) create mode 100644 types/random-obj-prop/index.d.ts create mode 100644 types/random-obj-prop/random-obj-prop-tests.ts create mode 100644 types/random-obj-prop/tsconfig.json create mode 100644 types/random-obj-prop/tslint.json diff --git a/types/random-obj-prop/index.d.ts b/types/random-obj-prop/index.d.ts new file mode 100644 index 0000000000..f9aca5624f --- /dev/null +++ b/types/random-obj-prop/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for random-obj-prop 1.0 +// Project: https://github.com/sindresorhus/random-obj-prop +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = randomObjProp; + +declare function randomObjProp(input: { [key: string]: T }): T; diff --git a/types/random-obj-prop/random-obj-prop-tests.ts b/types/random-obj-prop/random-obj-prop-tests.ts new file mode 100644 index 0000000000..7dd2fcd67d --- /dev/null +++ b/types/random-obj-prop/random-obj-prop-tests.ts @@ -0,0 +1,4 @@ +import randomObjProp = require('random-obj-prop'); + +// $ExpectType string | number +randomObjProp({ foo: 'pony', bar: 1 }); diff --git a/types/random-obj-prop/tsconfig.json b/types/random-obj-prop/tsconfig.json new file mode 100644 index 0000000000..f155cfc211 --- /dev/null +++ b/types/random-obj-prop/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "random-obj-prop-tests.ts" + ] +} diff --git a/types/random-obj-prop/tslint.json b/types/random-obj-prop/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/random-obj-prop/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 9299a86a8b8fafe190f26f00726eee07d2e4e2a1 Mon Sep 17 00:00:00 2001 From: Yaroslav Admin Date: Tue, 27 Nov 2018 21:08:52 +0100 Subject: [PATCH 1063/1121] Improved structure of the karma type definitions --- types/karma/index.d.ts | 77 +++++++++++++++++++------------------- types/karma/karma-tests.ts | 22 +++++------ 2 files changed, 49 insertions(+), 50 deletions(-) diff --git a/types/karma/index.d.ts b/types/karma/index.d.ts index ba258f0997..09b263e104 100644 --- a/types/karma/index.d.ts +++ b/types/karma/index.d.ts @@ -14,24 +14,24 @@ import https = require('https'); import { Appender } from 'log4js'; declare namespace karma { - interface Karma { - /** - * `start` method is deprecated since 0.13. It will be removed in 0.14. - * Please use - * - * server = new Server(config, [done]) - * server.start() - * - * instead. - */ - server: DeprecatedServer; - Server: Server; - runner: Runner; - stopper: Stopper; - launcher: Launcher; - VERSION: string; - constants: Constants; - } + /** + * `start` method is deprecated since 0.13. It will be removed in 0.14. + * Please use + * + * server = new Server(config, [done]) + * server.start() + * + * instead. + * + * @deprecated + */ + const server: DeprecatedServer; + + const runner: Runner; + const stopper: Stopper; + + const VERSION: string; + const constants: Constants; interface Constants { VERSION: string; @@ -57,24 +57,25 @@ declare namespace karma { EXIT_CODE: string; } - interface LauncherStatic { - generateId(): string; - // TODO: injector should be of type `di.Injector` - new (emitter: NodeJS.EventEmitter, injector: any): Launcher; - } + namespace launcher { + class Launcher { + static generateId(): string; - interface Launcher { - Launcher: LauncherStatic; - // TODO: Can this return value ever be typified? - launch(names: string[], protocol: string, hostname: string, port: number, urlRoot: string): any[]; - kill(id: string, callback: () => void): boolean; - restart(id: string): boolean; - killAll(callback: () => void): void; - areAllCaptured(): boolean; - markCaptured(id: string): void; + constructor(emitter: NodeJS.EventEmitter, injector: any); + + // TODO: Can this return value ever be typified? + launch(names: string[], protocol: string, hostname: string, port: number, urlRoot: string): any[]; + kill(id: string, callback: () => void): boolean; + restart(id: string): boolean; + killAll(callback: () => void): void; + areAllCaptured(): boolean; + markCaptured(id: string): void; + } } + /** @deprecated */ interface DeprecatedServer { + /** @deprecated */ start(options?: any, callback?: ServerCallback): void; } @@ -97,10 +98,8 @@ declare namespace karma { success: number; } - interface Server extends NodeJS.EventEmitter { - // TODO: Figure out how to convert Server to class and remove suppression - // tslint:disable-next-line:no-misused-new - new (options?: ConfigOptions | ConfigFile, callback?: ServerCallback): Server; + class Server extends NodeJS.EventEmitter { + constructor(options?: ConfigOptions | ConfigFile, callback?: ServerCallback); /** * Start the server */ @@ -468,8 +467,10 @@ declare namespace karma { flags?: string[]; platform?: string; } + + namespace config { + function parseConfig(configFilePath: string, cliOptions: ConfigOptions): Config; + } } -declare var karma: karma.Karma; - export = karma; diff --git a/types/karma/karma-tests.ts b/types/karma/karma-tests.ts index 4114a77b02..4065a4deff 100644 --- a/types/karma/karma-tests.ts +++ b/types/karma/karma-tests.ts @@ -1,16 +1,6 @@ -import gulp = require('gulp'); import karma = require('karma'); -function runKarma(singleRun: boolean): void { - // MEMO: `start` method is deprecated since 0.13. It will be removed in 0.14. - karma.server.start({ - configFile: __dirname + '/karma.conf.js', - singleRun - }); -} - -gulp.task('test:unit:karma', gulp.parallel('build:test:unit', () => runKarma(true))); - +// karma.server is deprecated and will eventually be removed karma.server.start({port: 9876}, (exitCode: number) => { console.log('Karma has exited with ' + exitCode); process.exit(exitCode); @@ -54,7 +44,8 @@ karma.runner.run({port: 9876}, (exitCode: number) => { process.exit(exitCode); }); -const captured: boolean = karma.launcher.areAllCaptured(); +const launcher: karma.launcher.Launcher = null; +const captured: boolean = launcher.areAllCaptured(); // Example of configuration file karma.conf.ts, see http://karma-runner.github.io/latest/config/configuration-file.html module.exports = (config: karma.Config) => { @@ -123,3 +114,10 @@ const foo = (config: karma.Config) => { } }); }; + +console.log(karma.constants.DEFAULT_HOSTNAME); +console.log(karma.VERSION); + +karma.config.parseConfig('karma.conf.js', { + singleRun: true +}); From 80c2f3dd1202e234af247afb0b7f9e5eaaa2789d Mon Sep 17 00:00:00 2001 From: Yaroslav Admin Date: Tue, 27 Nov 2018 21:29:37 +0100 Subject: [PATCH 1064/1121] Eliminated obsolete namespace wrapper See https://github.com/Microsoft/dtslint/blob/master/docs/export-just-namespace.md --- types/karma/index.d.ts | 896 ++++++++++++++++++++--------------------- 1 file changed, 446 insertions(+), 450 deletions(-) diff --git a/types/karma/index.d.ts b/types/karma/index.d.ts index 09b263e104..0da2803283 100644 --- a/types/karma/index.d.ts +++ b/types/karma/index.d.ts @@ -13,464 +13,460 @@ import Promise = require('bluebird'); import https = require('https'); import { Appender } from 'log4js'; -declare namespace karma { - /** - * `start` method is deprecated since 0.13. It will be removed in 0.14. - * Please use - * - * server = new Server(config, [done]) - * server.start() - * - * instead. - * - * @deprecated - */ - const server: DeprecatedServer; +/** + * `start` method is deprecated since 0.13. It will be removed in 0.14. + * Please use + * + * server = new Server(config, [done]) + * server.start() + * + * instead. + * + * @deprecated + */ +export const server: DeprecatedServer; - const runner: Runner; - const stopper: Stopper; +export const runner: Runner; +export const stopper: Stopper; - const VERSION: string; - const constants: Constants; +export const VERSION: string; +export const constants: Constants; - interface Constants { - VERSION: string; - DEFAULT_PORT: number; - DEFAULT_HOSTNAME: string; - DEFAULT_LISTEN_ADDR: string; - LOG_DISABLE: string; - LOG_ERROR: string; - LOG_WARN: string; - LOG_INFO: string; - LOG_DEBUG: string; - LOG_LOG: string; - LOG_PRIORITIES: string[]; - COLOR_PATTERN: string; - NO_COLOR_PATTERN: string; - CONSOLE_APPENDER: { +export interface Constants { + VERSION: string; + DEFAULT_PORT: number; + DEFAULT_HOSTNAME: string; + DEFAULT_LISTEN_ADDR: string; + LOG_DISABLE: string; + LOG_ERROR: string; + LOG_WARN: string; + LOG_INFO: string; + LOG_DEBUG: string; + LOG_LOG: string; + LOG_PRIORITIES: string[]; + COLOR_PATTERN: string; + NO_COLOR_PATTERN: string; + CONSOLE_APPENDER: { + type: string; + layout: { type: string; - layout: { - type: string; - pattern: string; - }; + pattern: string; }; - EXIT_CODE: string; - } + }; + EXIT_CODE: string; +} - namespace launcher { - class Launcher { - static generateId(): string; +export namespace launcher { + class Launcher { + static generateId(): string; - constructor(emitter: NodeJS.EventEmitter, injector: any); + constructor(emitter: NodeJS.EventEmitter, injector: any); - // TODO: Can this return value ever be typified? - launch(names: string[], protocol: string, hostname: string, port: number, urlRoot: string): any[]; - kill(id: string, callback: () => void): boolean; - restart(id: string): boolean; - killAll(callback: () => void): void; - areAllCaptured(): boolean; - markCaptured(id: string): void; - } - } - - /** @deprecated */ - interface DeprecatedServer { - /** @deprecated */ - start(options?: any, callback?: ServerCallback): void; - } - - interface Runner { - run(options?: ConfigOptions | ConfigFile, callback?: ServerCallback): void; - } - - interface Stopper { - /** - * This function will signal a running server to stop. The equivalent of karma stop. - */ - stop(options?: ConfigOptions, callback?: ServerCallback): void; - } - - interface TestResults { - disconnected: boolean; - error: boolean; - exitCode: number; - failed: number; - success: number; - } - - class Server extends NodeJS.EventEmitter { - constructor(options?: ConfigOptions | ConfigFile, callback?: ServerCallback); - /** - * Start the server - */ - start(): void; - /** - * Get properties from the injector - * @param token - */ - get(token: string): any; - /** - * Force a refresh of the file list - */ - refreshFiles(): Promise; - - on(event: string, listener: (...args: any[]) => void): this; - - /** - * Listen to the 'run_complete' event. - */ - on(event: 'run_complete', listener: (browsers: any, results: TestResults) => void): this; - - /** - * Backward-compatibility with karma-intellij bundled with WebStorm. - * Deprecated since version 0.13, to be removed in 0.14 - */ - // static start(): void; - } - - type ServerCallback = (exitCode: number) => void; - - interface Config { - set: (config: ConfigOptions) => void; - LOG_DISABLE: string; - LOG_ERROR: string; - LOG_WARN: string; - LOG_INFO: string; - LOG_DEBUG: string; - } - - interface ConfigFile { - configFile: string; - } - - interface ConfigOptions { - /** - * @description Enable or disable watching files and executing the tests whenever one of these files changes. - * @default true - */ - autoWatch?: boolean; - /** - * @description When Karma is watching the files for changes, it tries to batch multiple changes into a single run - * so that the test runner doesn't try to start and restart running tests more than it should. - * The configuration setting tells Karma how long to wait (in milliseconds) after any changes have occurred - * before starting the test process again. - * @default 250 - */ - autoWatchBatchDelay?: number; - /** - * @default '' - * @description The root path location that will be used to resolve all relative paths defined in files and exclude. - * If the basePath configuration is a relative path then it will be resolved to - * the __dirname of the configuration file. - */ - basePath?: string; - /** - * @default 2000 - * @description How long does Karma wait for a browser to reconnect (in ms). - *

- * With a flaky connection it is pretty common that the browser disconnects, - * but the actual test execution is still running without any problems. Karma does not treat a disconnection - * as immediate failure and will wait browserDisconnectTimeout (ms). - * If the browser reconnects during that time, everything is fine. - *

- */ - browserDisconnectTimeout?: number; - /** - * @default 0 - * @description The number of disconnections tolerated. - *

- * The disconnectTolerance value represents the maximum number of tries a browser will attempt - * in the case of a disconnection. Usually any disconnection is considered a failure, - * but this option allows you to define a tolerance level when there is a flaky network link between - * the Karma server and the browsers. - *

- */ - browserDisconnectTolerance?: number; - /** - * @default 10000 - * @description How long will Karma wait for a message from a browser before disconnecting from it (in ms). - *

- * If, during test execution, Karma does not receive any message from a browser within - * browserNoActivityTimeout (ms), it will disconnect from the browser - *

- */ - browserNoActivityTimeout?: number; - /** - * @default [] - * Possible Values: - *
    - *
  • Chrome (launcher comes installed with Karma)
  • - *
  • ChromeCanary (launcher comes installed with Karma)
  • - *
  • PhantomJS (launcher comes installed with Karma)
  • - *
  • Firefox (launcher requires karma-firefox-launcher plugin)
  • - *
  • Opera (launcher requires karma-opera-launcher plugin)
  • - *
  • Internet Explorer (launcher requires karma-ie-launcher plugin)
  • - *
  • Safari (launcher requires karma-safari-launcher plugin)
  • - *
- * @description A list of browsers to launch and capture. When Karma starts up, it will also start up each browser - * which is placed within this setting. Once Karma is shut down, it will shut down these browsers as well. - * You can capture any browser manually by opening the browser and visiting the URL where - * the Karma web server is listening (by default it is http://localhost:9876/). - */ - browsers?: string[]; - /** - * @default 60000 - * @description Timeout for capturing a browser (in ms). - *

- * The captureTimeout value represents the maximum boot-up time allowed for a - * browser to start and connect to Karma. If any browser does not get captured within the timeout, Karma - * will kill it and try to launch it again and, after three attempts to capture it, Karma will give up. - *

- */ - captureTimeout?: number; - client?: ClientOptions; - /** - * @default true - * @description Enable or disable colors in the output (reporters and logs). - */ - colors?: boolean; - /** - * @default 'Infinity' - * @description How many browsers Karma launches in parallel. - * Especially on services like SauceLabs and Browserstack, it makes sense only to launch a limited - * amount of browsers at once, and only start more when those have finished. Using this configuration, - * you can specify how many browsers should be running at once at any given point in time. - */ - concurrency?: number; - customLaunchers?: { [key: string]: CustomLauncher }; - /** - * @default [] - * @description List of files/patterns to exclude from loaded files. - */ - exclude?: string[]; - /** - * @default [] - * @description List of files/patterns to load in the browser. - */ - files?: Array; - /** - * @default [] - * @description List of test frameworks you want to use. Typically, you will set this to ['jasmine'], ['mocha'] or ['qunit']... - * Please note just about all frameworks in Karma require an additional plugin/framework library to be installed (via NPM). - */ - frameworks?: string[]; - /** - * @default 'localhost' - * @description Hostname to be used when capturing browsers. - */ - hostname?: string; - /** - * @default {} - * @description Options object to be used by Node's https class. - * Object description can be found in the - * [NodeJS.org API docs](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener) - */ - httpsServerOptions?: https.ServerOptions; - /** - * @default config.LOG_INFO - * Possible values: - *
    - *
  • config.LOG_DISABLE
  • - *
  • config.LOG_ERROR
  • - *
  • config.LOG_WARN
  • - *
  • config.LOG_INFO
  • - *
  • config.LOG_DEBUG
  • - *
- * @description Level of logging. - */ - logLevel?: string; - /** - * @default [{type: 'console'}] - * @description A list of log appenders to be used. See the documentation for [log4js] for more information. - */ - loggers?: { [name: string]: Appender } | Appender[]; - /** - * @default [] - * @description List of names of additional middleware you want the - * Karma server to use. Middleware will be used in the order listed. - * You must have installed the middleware via a plugin/framework - * (either inline or via NPM). Additional information can be found in - * [plugins](http://karma-runner.github.io/2.0/config/plugins.html). - * The plugin must provide an express/connect middleware function - * (details about this can be found in the - * [Express](http://expressjs.com/guide/using-middleware.html) docs). - */ - middleware?: string[]; - /** - * @default {} - * @description Redefine default mapping from file extensions to MIME-type. - * Set property name to required MIME, provide Array of extensions (without dots) as it's value. - */ - mime?: {[type: string]: string[]}; - /** - * @default ['karma-*'] - * @description List of plugins to load. A plugin can be a string (in which case it will be required - * by Karma) or an inlined plugin - Object. - * By default, Karma loads all sibling NPM modules which have a name starting with karma-*. - * Note: Just about all plugins in Karma require an additional library to be installed (via NPM). - */ - plugins?: any[]; - /** - * @default 9876 - * @description The port where the web server will be listening. - */ - port?: number; - /** - * @default {'**\/*.coffee': 'coffee'} - * @description A map of preprocessors to use. - * - * Preprocessors can be loaded through [plugins]. - * - * Note: Just about all preprocessors in Karma (other than CoffeeScript and some other defaults) - * require an additional library to be installed (via NPM). - * - * Be aware that preprocessors may be transforming the files and file types that are available at run time. For instance, - * if you are using the "coverage" preprocessor on your source files, if you then attempt to interactively debug - * your tests, you'll discover that your expected source code is completely changed from what you expected. Because - * of that, you'll want to engineer this so that your automated builds use the coverage entry in the "reporters" list, - * but your interactive debugging does not. - * - */ - preprocessors?: { [name: string]: string | string[] }; - /** - * @default 'http:' - * Possible Values: - *
    - *
  • http:
  • - *
  • https:
  • - *
- * @description Protocol used for running the Karma webserver. - * Determines the use of the Node http or https class. - * Note: Using 'https:' requires you to specify httpsServerOptions. - */ - protocol?: string; - /** - * @default {} - * @description A map of path-proxy pairs. - */ - proxies?: { [path: string]: string }; - /** - * @default true - * @description Whether or not Karma or any browsers should raise an error when an inavlid SSL certificate is found. - */ - proxyValidateSSL?: boolean; - /** - * @default 0 - * @description Karma will report all the tests that are slower than given time limit (in ms). - * This is disabled by default (since the default value is 0). - */ - reportSlowerThan?: number; - /** - * @default ['progress'] - * Possible Values: - *
    - *
  • dots
  • - *
  • progress
  • - *
- * @description A list of reporters to use. - * Additional reporters, such as growl, junit, teamcity or coverage can be loaded through plugins. - * Note: Just about all additional reporters in Karma (other than progress) require an additional library to be installed (via NPM). - */ - reporters?: string[]; - /** - * @default false - * @description Continuous Integration mode. - * If true, Karma will start and capture all configured browsers, run tests and then exit with an exit code of 0 or 1 depending - * on whether all tests passed or any tests failed. - */ - singleRun?: boolean; - /** - * @default ['polling', 'websocket'] - * @description An array of allowed transport methods between the browser and testing server. This configuration setting - * is handed off to [socket.io](http://socket.io/) (which manages the communication - * between browsers and the testing server). - */ - transports?: string[]; - /** - * @default '/' - * @description The base url, where Karma runs. - * All of Karma's urls get prefixed with the urlRoot. This is helpful when using proxies, as - * sometimes you might want to proxy a url that is already taken by Karma. - */ - urlRoot?: string; - } - - interface ClientOptions { - /** - * @default undefined - * @description When karma run is passed additional arguments on the command-line, they - * are passed through to the test adapter as karma.config.args (an array of strings). - * The client.args option allows you to set this value for actions other than run. - * How this value is used is up to your test adapter - you should check your adapter's - * documentation to see how (and if) it uses this value. - */ - args?: string[]; - /** - * @default true - * @description Run the tests inside an iFrame or a new window - * If true, Karma runs the tests inside an iFrame. If false, Karma runs the tests in a new window. Some tests may not run in an - * iFrame and may need a new window to run. - */ - useIframe?: boolean; - /** - * @default true - * @description Capture all console output and pipe it to the terminal. - */ - captureConsole?: boolean; - /** - * @default false - * @description Run the tests on the same window as the client, without using iframe or a new window - */ - runInParent?: boolean; - /** - * @default true - * @description Clear the context window - * If true, Karma clears the context window upon the completion of running the tests. - * If false, Karma does not clear the context window upon the completion of running the tests. - * Setting this to false is useful when embedding a Jasmine Spec Runner Template. - */ - clearContext?: boolean; - } - - interface FilePattern { - /** - * The pattern to use for matching. This property is mandatory. - */ - pattern: string; - /** - * @default true - * @description If autoWatch is true all files that have set watched to true will be watched - * for changes. - */ - watched?: boolean; - /** - * @default true - * @description Should the files be included in the browser using